いろいろメモ

Link

卜部昌平のあまりreblogしないtumblr: 最速の memset64 を求めて 今回のお題は char 幅じゃなくて word 幅の memset 、つまりプロトタイプだと void*...

shyouhei:

最速の memset64 を求めて

今回のお題は char 幅じゃなくて word 幅の memset 、つまりプロトタイプだと

void* memset64(void* destination, uint64_t image, int num_words);

をどれだけ高速に行うかという話。なぜ高速化するかというと、塗りつぶす領域がけっこうでかいから。

候補 1: REP STOS

void*
memset64(void* d, uint64_t i, int n)
{ asm("cld; rep stosq;" :: "D"(d), "a"(i), "c"(n) :...
via shyouhei
Posted on Saturday, January 29 2011.
33
Notes
  1. glasssaga2 liked this
  2. lnial reblogged this from shyouhei
  3. lnial liked this
  4. kzghm liked this
  5. vuking reblogged this from shyouhei
  6. tyru-tech reblogged this from shyouhei
  7. tsuka reblogged this from shyouhei
  8. ohmizaiju reblogged this from mrkn20
  9. mrkn20 reblogged this from shyouhei
  10. sharkpp reblogged this from shyouhei
  11. shino reblogged this from shyouhei
  12. lugecy reblogged this from shyouhei
  13. cr96 reblogged this from nigaky
  14. raydive reblogged this from shyouhei
  15. kiyoya liked this
  16. nigaky reblogged this from shyouhei
  17. nonokao reblogged this from shyouhei
  18. yanma reblogged this from shyouhei
  19. malmrashede reblogged this from shyouhei
  20. yusc liked this
  21. mootohclip reblogged this from shyouhei
  22. hellsing125 reblogged this from shyouhei
  23. mosugi reblogged this from shyouhei
  24. hepton-rk reblogged this from shyouhei
  25. atm09td reblogged this from shyouhei
  26. send reblogged this from shyouhei
  27. siyo reblogged this from shyouhei
  28. chezmimorin liked this
  29. katsyoshi liked this
  30. katsyoshi reblogged this from shyouhei
  31. random-oracle reblogged this from shyouhei
  32. shyouhei posted this
Previous Next