diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-02-08 11:32:22 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-02-12 10:35:18 +0100 |
commit | 885484c97bb17bed42d3fcaeda60d1e0f2c52dab (patch) | |
tree | 9afd4ecefc8ace54a1f12bc824bda6462bfbbefc /libguile/continuations.c | |
parent | f4b0c3a93f1c12da8a6f0f7d37099956e2667946 (diff) |
Handle GMP allocations through libgc and remove bignum finalizers.
This significantly speeds up loads that create lots of bignums, like
(language cps slot-allocation) for files with many top-level
definitions. Compiling such a file is typically 2.5 times faster.
See <https://lists.gnu.org/archive/html/guile-devel/2020-02/msg00023.html>.
* libguile/numbers.c (custom_gmp_malloc): Use
'scm_gc_malloc_pointerless' instead of 'scm_malloc'.
(custom_gmp_realloc): Use 'scm_gc_realloc'.
(custom_gmp_free): Remove call to 'free'.
(make_bignum): Use 'scm_gc_malloc' instead of 'scm_gc_malloc_pointerless'.
Call 'scm_i_set_finalizer' only when SCM_INSTALL_GMP_MEMORY_FUNCTIONS is
false.
Diffstat (limited to 'libguile/continuations.c')
0 files changed, 0 insertions, 0 deletions