# ArgIteratorWindows.init: Take \`\[\]const u16\` slice instead of multi-item pointer · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/d48251d0f0d2de2f618afe65db3ba425b332d5c4)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: d48251d0f0d2de2f618afe65db3ba425b332d5c4

Requested commit: d48251d0f0d2de2f618afe65db3ba425b332d5c4

Commit: d48251d0f0d2de2f618afe65db3ba425b332d5c4

Tree: 6e68a4f307c7a8ec048a8bc8f5dacc04f6979341

Author: Ryan Liptak

Committer: Ryan Liptak

## Message

```
ArgIteratorWindows.init: Take `[]const u16` slice instead of multi-item pointer

Now that we use the PEB to get the precise length of the command line string, there's no need for a multi-item pointer/sliceTo call. This provides a minor speedup:

    Benchmark 1 (153 runs): benchargv-before.exe
      measurement          mean ± σ            min … max           outliers         delta
      wall_time          32.7ms ±  429us    32.1ms … 36.9ms          1 ( 1%)        0%
      peak_rss           6.49MB ± 5.62KB    6.46MB … 6.49MB         14 ( 9%)        0%
    Benchmark 2 (157 runs): benchargv-after.exe
      measurement          mean ± σ            min … max           outliers         delta
      wall_time          31.9ms ±  236us    31.4ms … 32.7ms          4 ( 3%)        ⚡-  2.4% ±  0.2%
      peak_rss           6.49MB ± 4.77KB    6.46MB … 6.49MB         14 ( 9%)          +  0.0% ±  0.0%

```

## Parents

- [1a62cfffa79917d930b77f2598b1bfc93efeede5](https://git.cafe/gitcafe/zig/commit/1a62cfffa79917d930b77f2598b1bfc93efeede5?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/d48251d0f0d2de2f618afe65db3ba425b332d5c4?format=markdown)
