diff options
| author | Nico Elbers <nico.b.elbers@gmail.com> | 2025-11-03 12:05:57 +0100 |
|---|---|---|
| committer | Nico Elbers <nico.b.elbers@gmail.com> | 2025-11-27 15:46:16 +0100 |
| commit | ceba9572ef5fc3a4c7e2e3f315d05842d2422d0c (patch) | |
| tree | 58f2fc73dbe862b1457f1acd598535423f5ab046 /c_headers/module.modulemap | |
| parent | 854774d468b0a439def7eef73c544ac8d64f1b62 (diff) | |
| download | zig-ceba9572ef5fc3a4c7e2e3f315d05842d2422d0c.tar.gz zig-ceba9572ef5fc3a4c7e2e3f315d05842d2422d0c.zip | |
Optimize Writer.writeLeb128
Rewrite `writeLeb128` to no longer use `writeMultipleOf7Leb128` and instead:
* Make use of byte aligned ints
* Special case small numbers (fitting inside 7 bits)
Amongst u8, u16, u32 and u64 performance gains are between ~1.5x and ~2x
Amongst i8, i16, i32 ane i64 perfromance gains are between ~2x and >4x
Additinally add test coverage for written encodings
Microbenchmark: https://zigbin.io/7ed5fe
Diffstat (limited to 'c_headers/module.modulemap')
0 files changed, 0 insertions, 0 deletions
