Skip to content

Instantly share code, notes, and snippets.

@sglienke
sglienke / PDQSortBench.txt
Last active August 1, 2024 17:21
QuickSort, IntroSort, TimSort, PDQSort Benchmark
-------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
-------------------------------------------------------------------------------------
random/QuickSort/count:100 3010 ns 2699 ns 10
random/IntroSort/count:100 1910 ns 1845 ns 10
random/TimSort/count:100 2410 ns 2393 ns 10
random/PDQSort/count:100 1180 ns 1123 ns 10
random/QuickSort/count:1000 45180 ns 45113 ns 10
random/IntroSort/count:1000 22280 ns 22206 ns 10
random/TimSort/count:1000 33990 ns 33900 ns 10
@sglienke
sglienke / Swap32
Last active October 20, 2021 11:10
mov eax,ecx
shr eax,$10
and ecx,$0000ffff
mov edx,eax
and edx,$ffff0000
mov r8d,eax
and r8d,$000000ff
shl r8d,$08
and eax,$0000ff00
shr eax,$08