Hacker News new | ask | show | jobs
by wmf 634 days ago
It's probably faster to memcpy the thing then "swap" each element (the swaps may be no-ops under the hood). This should be portable and fast.