jump to:allmastodonblueskylemmylobstersdevstackwikirsshn
wwebbit
view: | | |

Knowledge / Stack Overflow · hot matching “cpu-architecture”

1 shown · updated 1m ago · read only
  1. Why is rep movsb slow for overlapping forward memmove, and why does libc use it? (stackoverflow.com)stack

    11 points by Alex Guteniev in stackoverflow.com · 15mo ago · stack

    TL;DR: memmove that uses rep movsb is magnitudes slow on overlapping array of 8193 bytes compared to memmove for 8191 elements that doesn't use rep movsb . I'm asking why. Consider the following benchmark: #include <benchmark/benchmark.h> #include <cstring> using namespace std;…