# std.unicode.utf8ToUtf16Le: improve performance · gitcafe/zig

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

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

Visibility: public

Requested revision: c3d20373ee232c7eabcf11a22c1c5e130f2a58cb

Requested commit: c3d20373ee232c7eabcf11a22c1c5e130f2a58cb

Commit: c3d20373ee232c7eabcf11a22c1c5e130f2a58cb

Tree: e8bbeda29aa7fb467fe511832413b8c0240a9829

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.unicode.utf8ToUtf16Le: improve performance

on a simple test input:

original utf8ToUtf16Le: elapsed: 111384483 ns (111 ms)
new utf8ToUtf16Le: elapsed: 138570 ns (0 ms)

it's 800x faster in debug mode and ~4500x faster in release-fast mode.

this was slowing down installation of files on windows in build scripts.

```

## Parents

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

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