Refactor `stgReallocForGMP` to use `memcpy`
authorHerbert Valerio Riedel <hvr@gnu.org>
Fri, 3 Jan 2014 21:58:32 +0000 (22:58 +0100)
committerHerbert Valerio Riedel <hvr@gnu.org>
Fri, 3 Jan 2014 21:58:32 +0000 (22:58 +0100)
commit66ea120f3a31ba8d81556fa121f9b998eef570b8
treea4c6e2a5c1e97be643ae46e2d24e95ae93eefc02
parentc6f046a32a51898cc4ce96b3d4954b2133acd75a
Refactor `stgReallocForGMP` to use `memcpy`

GCC is able to generate better code when using `memcpy` instead of
manually copying bytes in a loop. Otoh, `stgAllocForGMP` is typically
called for enlarging initial single-limb structures (see also #8647 for
more information) and so this minor optimization won't be very visible
in measurements.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
cbits/alloc.c