chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Make (time) annonce the maximum heap size


From: Kooda
Subject: Re: [Chicken-hackers] [PATCH] Make (time) annonce the maximum heap size used
Date: Sun, 18 Sep 2016 18:34:10 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/24.5 (x86_64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO)

On Sun, 18 Sep 2016 14:32:51 +0200,
Peter Bex wrote:
> - C_number() is a bit of a strange function that we should probably
>     get rid of.  I've replaced it with C_unsigned_int_to_num, which,
>     despite its name, accepts a C_uword and converts it to a fixnum or
>     flonum (or in CHICKEN 5, a bignum).

Ok, I didn’t know about that one.


> - Printing a very large number in bytes is not very user-friendly so
>     I've added a quick and dirty conversion to KiB/MiB/GiB.
>     This will make parsing it a bit more difficult for chicken-benchmarks,
>     but it's worthwhile, I think, because time is useful on its own.

Yep, that’s fine by me.

I was considering making chicken-benchmarks use the vector returned by
##sys#stop-timer instead of parsing time’s textual output anyways, so
it might not be so much of a problem.


> - Added a NEWS entry.

Ah, right. I always forget about that.


> In CHICKEN 5, the C_number function is only used for the "number" foreign
> type specifier, for which the documentation says:
> 
>   A floating-point number. Similar to double, but when used as a result
>   type, then either an exact integer or a floating-point number is
>   returned, depending on whether the result fits into an exact integer
>   or not.
> 
> We might want to consider getting rid of that, because it makes very
> little sense to do that in a Scheme with bignums.  And if it's truly
> a floating-point number that is returned, it makes more sense to put
> it in a flonum.  Objections, anyone?

Sounds good to me. :)


Thanks a lot for reviewing this patch! :D



reply via email to

[Prev in Thread] Current Thread [Next in Thread]