[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Reduce silly & needless scratch space allo
From: |
Evan Hanson |
Subject: |
Re: [Chicken-hackers] [PATCH] Reduce silly & needless scratch space allocation when reading numbers |
Date: |
Fri, 10 Mar 2017 14:37:13 +1300 |
Hi Peter,
Good catch! I was wondering about that, glad you found the cause.
On 2017-03-09 21:54, Peter Bex wrote:
> diff --git a/library.scm b/library.scm
> index 14fc9e5..284b653 100644
> --- a/library.scm
> +++ b/library.scm
> @@ -1800,7 +1800,7 @@ EOF
> (end (or hashes digits)))
> (and-let* ((end)
> (num (##core#inline_allocate
> - ("C_s_a_i_digits_to_integer" 2)
> + ("C_s_a_i_digits_to_integer" 5)
> str start (car end) radix neg?)))
> (when hashes ; Eeewww. Feeling dirty yet?
> (set! seen-hashes? #t)
> @@ -1815,7 +1815,7 @@ EOF
> (end (scan-digits start)))
> (go-inexact!)
> (cons (##core#inline_allocate
> - ("C_s_a_i_digits_to_integer" 2)
> + ("C_s_a_i_digits_to_integer" 5)
> str start (car end) radix (eq? sign 'neg))
> (cdr end)))))))
> (scan-decimal-tail ; The part after the decimal dot
I'm probably missing something, but if I understand correctly, you're
adding special cases for allocation sizes <= 2, so shouldn't the
##inline#allocate size be bumped by two to 4, rather than by three to 5?
Evan
signature.asc
Description: PGP signature