Commit 1b9d9d16 authored by Paul Eggert's avatar Paul Eggert

* lisp.h (vcopy): Use memcpy rather than our own loop.

This fixes a performance regression introduced by the recent
addition of vcopy.  This means 'vcopy' will need to be modified
for a copying collector, but that's OK.  Also, tighten the
checking in the assertion.
parent b2f09701
2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
* lisp.h (vcopy): Use memcpy rather than our own loop.
This fixes a performance regression introduced by the recent
addition of vcopy. This means 'vcopy' will need to be modified
for a copying collector, but that's OK. Also, tighten the
checking in the assertion.
2012-08-21 Eli Zaretskii <eliz@gnu.org>
* w32uniscribe.c (uniscribe_shape): Fix producing gstring
......
......@@ -2349,11 +2349,8 @@ gc_aset (Lisp_Object array, ptrdiff_t idx, Lisp_Object val)
LISP_INLINE void
vcopy (Lisp_Object v, ptrdiff_t offset, Lisp_Object *args, ptrdiff_t count)
{
ptrdiff_t i;
eassert (offset + count <= ASIZE (v));
for (i = 0; i < count; i++)
ASET (v, offset + i, args[i]);
eassert (0 <= offset && 0 <= count && offset + count <= ASIZE (v));
memcpy (XVECTOR (v)->contents + offset, args, count * sizeof *args);
}
/* Functions to modify hash tables. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment