diff options
| author | Jan Philipp Hafer <jan.hafer@rwth-aachen.de> | 2021-09-03 01:12:48 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-11-29 12:50:25 -0800 |
| commit | 1ea650bb75e009bb37b5bd4e896a90e2a86f8583 (patch) | |
| tree | b23a47759b5c2f5c0f00a367227a56b03503c174 /lib/std/zig.zig | |
| parent | d3426ce634a09ec289480510040b3decfbd38c39 (diff) | |
| download | zig-1ea650bb75e009bb37b5bd4e896a90e2a86f8583.tar.gz zig-1ea650bb75e009bb37b5bd4e896a90e2a86f8583.zip | |
compiler_rt: add __popcountsi2, __popcountdi2 and __popcountti2
- apply simpler approach than LLVM for __popcountdi2
taken from The Art of Computer Programming and generalized
- rename popcountdi2.zig to popcount.zig
- test cases derived from popcountdi2_test.zig
- tests: compare naive approach 10_000 times with
random numbers created from naive seed 42
See #1290
Diffstat (limited to 'lib/std/zig.zig')
0 files changed, 0 insertions, 0 deletions
