{"id":16572777,"url":"https://github.com/lemire/pospopcnt_avx512","last_synced_at":"2025-10-29T02:30:17.578Z","repository":{"id":43655447,"uuid":"215830039","full_name":"lemire/pospopcnt_avx512","owner":"lemire","description":"benchmarking positional population count","archived":false,"fork":false,"pushed_at":"2024-03-13T11:45:46.000Z","size":74,"stargazers_count":14,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-01T21:11:12.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lemire.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null}},"created_at":"2019-10-17T15:48:55.000Z","updated_at":"2025-01-29T11:15:42.000Z","dependencies_parsed_at":"2024-02-28T02:26:53.671Z","dependency_job_id":"e2d6cc66-4e23-4ec0-9130-149bcdead603","html_url":"https://github.com/lemire/pospopcnt_avx512","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemire%2Fpospopcnt_avx512","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemire%2Fpospopcnt_avx512/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemire%2Fpospopcnt_avx512/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemire%2Fpospopcnt_avx512/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemire","download_url":"https://codeload.github.com/lemire/pospopcnt_avx512/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238758238,"owners_count":19525732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T21:28:34.003Z","updated_at":"2025-10-29T02:30:16.933Z","avatar_url":"https://github.com/lemire.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Position population-count benchmarks\n\n### requirements\n\n- Linux, with bare-metal access (you may need root)\n- Make sure your processor is in performance mode (not powersaving)\n- x64 processor supporting the AVX512BW extension\n\n### instructions\n\n```\nmake\n./instrumented_benchmark -v\n```\n# Sample output\n\nOn a Cannon Lake processor:\n\n```\n$ ./instrumented_benchmark -v\nn = 10000000 m = 1 \niterations = 100 \narray size: 19.073 MB\nnothing                                         instructions per cycle 0.20, cycles per 16-bit word:  0.000, instructions per 16-bit word 0.000 \nmin:       65 cycles,       13 instructions,           1 branch mis.,        0 cache ref.,        0 cache mis.\navg:     69.4 cycles,     13.0 instructions,         1.0 branch mis.,      0.1 cache ref.,      0.1 cache mis.\n\n\npospopcnt_u16_scalar                            alignments: 16 \ninstructions per cycle 3.75, cycles per 16-bit word:  17.325, instructions per 16-bit word 65.000 \nmin: 173251245 cycles, 650000159 instructions,         3 branch mis.,   407959 cache ref.,   283659 cache mis.\navg: 173473725.4 cycles, 650000160.2 instructions,           8.4 branch mis., 409996.0 cache ref., 295584.1 cache mis.\n 0.367 GB/s \nestimated clock in range 3.102 GHz to 3.183 GHz\n\n\npospopcnt_u16_avx512bw_harvey_seal_1KB          alignments: 16 \ninstructions per cycle 0.46, cycles per 16-bit word:  0.497, instructions per 16-bit word 0.227 \nmin:  4966068 cycles,  2271648 instructions,         114 branch mis.,   547590 cache ref.,   262188 cache mis.\navg: 5296987.3 cycles, 2271648.7 instructions,     137.9 branch mis., 552796.2 cache ref., 275536.8 cache mis.\n 12.407 GB/s \nestimated clock in range 2.916 GHz to 3.140 GHz\n\n\npospopcnt_u16_avx512bw_harvey_seal_512B         alignments: 16 \ninstructions per cycle 0.60, cycles per 16-bit word:  0.538, instructions per 16-bit word 0.325 \nmin:  5382323 cycles,  3245605 instructions,          82 branch mis.,   487390 cache ref.,   268386 cache mis.\navg: 5697539.5 cycles, 3245605.8 instructions,     125.8 branch mis., 498338.1 cache ref., 279114.2 cache mis.\n 11.658 GB/s \nestimated clock in range 2.985 GHz to 3.142 GHz\n\n\npospopcnt_u16_avx512bw_harvey_seal_256B         alignments: 16 \ninstructions per cycle 0.84, cycles per 16-bit word:  0.618, instructions per 16-bit word 0.518 \nmin:  6184692 cycles,  5181931 instructions,         114 branch mis.,   441161 cache ref.,   267157 cache mis.\navg: 6661233.2 cycles, 5181931.2 instructions,     124.0 branch mis., 446684.9 cache ref., 280685.8 cache mis.\n 10.162 GB/s \nestimated clock in range 2.956 GHz to 3.148 GHz\n```\n\n### Reference\n\n- Marcus D. R. Klarqvist, Wojciech Muła, Daniel Lemire, [Efficient computation of positional population counts using SIMD instructions](https://arxiv.org/abs/1911.02696), Concurrency and Computation: Practice and Experience 33 (17), 2021.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemire%2Fpospopcnt_avx512","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemire%2Fpospopcnt_avx512","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemire%2Fpospopcnt_avx512/lists"}