Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide consistent alignment to swap_ranges benchmark #5043

Merged
merged 18 commits into from
Oct 30, 2024

Conversation

AlexGuteniev
Copy link
Contributor

Towards #5035

C:\Project\STL>start /B /WAIT /HIGH /AFFINITY 2 out\bench\benchmark-swap_ranges.exe --benchmark_min_time=2s
2024-10-26T19:35:11+03:00
Running out\bench\benchmark-swap_ranges.exe
Run on (12 X 2496 MHz CPU s)
CPU Caches:
  L1 Data 48 KiB (x6)
  L1 Instruction 32 KiB (x6)
  L2 Unified 1280 KiB (x6)
  L3 Unified 12288 KiB (x1)
---------------------------------------------------------------------------------------------
Benchmark                                                   Time             CPU   Iterations
---------------------------------------------------------------------------------------------
std_swap<1, uint8_t, aligner>                            1.64 ns         1.63 ns   1739805825
std_swap<5, uint8_t, aligner>                            1.64 ns         1.61 ns   1739805825
std_swap<15, uint8_t, aligner>                           2.11 ns         2.10 ns   1378461538
std_swap<26, uint8_t, aligner>                           2.12 ns         2.11 ns   1194666667
std_swap<38, uint8_t, aligner>                           2.12 ns         2.12 ns   1194666667
std_swap<60, uint8_t, aligner>                           2.59 ns         2.56 ns    995555556
std_swap<125, uint8_t, aligner>                          3.53 ns         3.51 ns    716800000
std_swap<800, uint8_t, aligner>                          13.0 ns         12.9 ns    215903614
std_swap<3000, uint8_t, aligner>                         47.8 ns         46.8 ns     57806452
std_swap<9000, uint8_t, aligner>                          141 ns          140 ns     20134831
std_swap<1, uint8_t, unaligner>                          1.65 ns         1.64 ns   1723076923
std_swap<5, uint8_t, unaligner>                          1.67 ns         1.67 ns   1644036697
std_swap<15, uint8_t, unaligner>                         2.12 ns         2.11 ns   1194666667
std_swap<26, uint8_t, unaligner>                         2.12 ns         2.09 ns   1194666667
std_swap<38, uint8_t, unaligner>                         2.12 ns         2.12 ns   1194666667
std_swap<60, uint8_t, unaligner>                         2.59 ns         2.58 ns   1054117647
std_swap<125, uint8_t, unaligner>                        4.47 ns         4.50 ns    663703704
std_swap<800, uint8_t, unaligner>                        24.2 ns         23.7 ns    112000000
std_swap<3000, uint8_t, unaligner>                       88.8 ns         88.2 ns     32581818
std_swap<9000, uint8_t, unaligner>                        287 ns          285 ns      9431579
std_swap_ranges<uint8_t, aligned_allocator>/1            1.88 ns         1.87 ns   1280000000
std_swap_ranges<uint8_t, aligned_allocator>/5            3.53 ns         3.54 ns    746666667
std_swap_ranges<uint8_t, aligned_allocator>/15           4.94 ns         4.88 ns    560000000
std_swap_ranges<uint8_t, aligned_allocator>/26           3.06 ns         3.03 ns    814545455
std_swap_ranges<uint8_t, aligned_allocator>/38           4.47 ns         4.43 ns    663703704
std_swap_ranges<uint8_t, aligned_allocator>/60           4.47 ns         4.47 ns    640000000
std_swap_ranges<uint8_t, aligned_allocator>/125          5.88 ns         5.84 ns    484324324
std_swap_ranges<uint8_t, aligned_allocator>/800          12.9 ns         13.0 ns    215903614
std_swap_ranges<uint8_t, aligned_allocator>/3000         45.9 ns         45.8 ns     61793103
std_swap_ranges<uint8_t, aligned_allocator>/9000          134 ns          131 ns     20837209
std_swap_ranges<uint8_t, unaligned_allocator>/1          1.88 ns         1.87 ns   1493333333
std_swap_ranges<uint8_t, unaligned_allocator>/5          3.53 ns         3.54 ns    746666667
std_swap_ranges<uint8_t, unaligned_allocator>/15         4.94 ns         4.91 ns    560000000
std_swap_ranges<uint8_t, unaligned_allocator>/26         3.06 ns         3.06 ns    853333333
std_swap_ranges<uint8_t, unaligned_allocator>/38         4.47 ns         4.44 ns    640000000
std_swap_ranges<uint8_t, unaligned_allocator>/60         4.47 ns         4.44 ns    640000000
std_swap_ranges<uint8_t, unaligned_allocator>/125        6.37 ns         6.39 ns    459487179
std_swap_ranges<uint8_t, unaligned_allocator>/800        18.6 ns         18.5 ns    137846154
std_swap_ranges<uint8_t, unaligned_allocator>/3000       67.7 ns         67.5 ns     40727273
std_swap_ranges<uint8_t, unaligned_allocator>/9000        221 ns          217 ns     11946667

@AlexGuteniev AlexGuteniev requested a review from a team as a code owner October 26, 2024 16:42
@StephanTLavavej StephanTLavavej added the test Related to test code label Oct 27, 2024
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
benchmarks/src/swap_ranges.cpp Outdated Show resolved Hide resolved
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
benchmarks/src/swap_ranges.cpp Show resolved Hide resolved
@StephanTLavavej StephanTLavavej self-assigned this Oct 27, 2024
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
benchmarks/inc/alloc.hpp Outdated Show resolved Hide resolved
@StephanTLavavej
Copy link
Member

Thanks! 😻 I pushed several commits, including a couple of bugfixes. FYI @CaseyCarter.

@StephanTLavavej StephanTLavavej removed their assignment Oct 29, 2024
@StephanTLavavej StephanTLavavej self-assigned this Oct 29, 2024
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@CaseyCarter CaseyCarter changed the title Provide consistent alignment to swap_ranges benchmark Provide consistent alignment to swap_ranges benchmark Oct 29, 2024
@StephanTLavavej StephanTLavavej merged commit 51d34c4 into microsoft:main Oct 30, 2024
39 checks passed
@StephanTLavavej
Copy link
Member

Thanks for realigning the benchmark! ⏱️ ↔️

@AlexGuteniev AlexGuteniev deleted the align branch October 30, 2024 15:01
AlexGuteniev added a commit to AlexGuteniev/STL that referenced this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Related to test code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants