Skip to content

Instantly share code, notes, and snippets.

@27Cobalter
Last active July 16, 2025 16:36
Show Gist options
  • Select an option

  • Save 27Cobalter/a84ce6f47ef97cee9e0021c8d546087c to your computer and use it in GitHub Desktop.

Select an option

Save 27Cobalter/a84ce6f47ef97cee9e0021c8d546087c to your computer and use it in GitHub Desktop.
cobalt@teto⮀~⮀⮀
⮁⮁⮁ sudo perf bench mem memcpy -s 2GB -l 10
# Running 'mem/memcpy' benchmark:
# function 'default' (Default memcpy() provided by glibc)
# Copying 2GB bytes ...
26.870777 GB/sec
# function 'x86-64-unrolled' (unrolled memcpy() in arch/x86/lib/memcpy_64.S)
# Copying 2GB bytes ...
18.227403 GB/sec # function 'x86-64-movsq' (movsq-based memcpy() in arch/x86/lib/memcpy_64.S)
# Copying 2GB bytes ...
30.957835 GB/sec
⬑ [sudo perf bench mem memcpy -s 2GB -l 10]->(0)⮀
cobalt@teto⮀~⮀⮀
⮁⮁⮁ sudo perf bench mem memcpy -s 2GB -l 100
# Running 'mem/memcpy' benchmark:
# function 'default' (Default memcpy() provided by glibc)
# Copying 2GB bytes ...
26.995238 GB/sec
# function 'x86-64-unrolled' (unrolled memcpy() in arch/x86/lib/memcpy_64.S)
# Copying 2GB bytes ...
17.492230 GB/sec
# function 'x86-64-movsq' (movsq-based memcpy() in arch/x86/lib/memcpy_64.S)
# Copying 2GB bytes ...
30.653342 GB/sec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment