diff options
| author | Paul Eggert | 2012-08-21 10:18:21 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-21 10:18:21 -0700 |
| commit | 1b9d9d1659f819252abb4d8f49e5fd0f7bb56efd (patch) | |
| tree | c425b1328e1ce7ac339c8d643740ff81fe473044 /src/lisp.h | |
| parent | b2f09701eadc7dfb70f331869daf295628926af6 (diff) | |
| download | emacs-1b9d9d1659f819252abb4d8f49e5fd0f7bb56efd.tar.gz emacs-1b9d9d1659f819252abb4d8f49e5fd0f7bb56efd.zip | |
* 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.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lisp.h b/src/lisp.h index 587e584b091..30bbb65f4fa 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2349,11 +2349,8 @@ gc_aset (Lisp_Object array, ptrdiff_t idx, Lisp_Object val) | |||
| 2349 | LISP_INLINE void | 2349 | LISP_INLINE void |
| 2350 | vcopy (Lisp_Object v, ptrdiff_t offset, Lisp_Object *args, ptrdiff_t count) | 2350 | vcopy (Lisp_Object v, ptrdiff_t offset, Lisp_Object *args, ptrdiff_t count) |
| 2351 | { | 2351 | { |
| 2352 | ptrdiff_t i; | 2352 | eassert (0 <= offset && 0 <= count && offset + count <= ASIZE (v)); |
| 2353 | 2353 | memcpy (XVECTOR (v)->contents + offset, args, count * sizeof *args); | |
| 2354 | eassert (offset + count <= ASIZE (v)); | ||
| 2355 | for (i = 0; i < count; i++) | ||
| 2356 | ASET (v, offset + i, args[i]); | ||
| 2357 | } | 2354 | } |
| 2358 | 2355 | ||
| 2359 | /* Functions to modify hash tables. */ | 2356 | /* Functions to modify hash tables. */ |