emacs-devel
[Top][All Lists]
Advanced

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

Re: NS port: How to debug excessive garbage collection?


From: Alex Gramiak
Subject: Re: NS port: How to debug excessive garbage collection?
Date: Sat, 13 Apr 2019 11:02:07 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Keith David Bershatsky <address@hidden> writes:

> ;;; begin STOCK / UNMODIFIED
> [...]
> ((cons_cells_consed 2455285)
>  (symbols_consed 16084)
>  (strings_consed 104220)
>  (string_chars_consed 2152636)
>  (vector_cells_consed 6884284)
>  (floats_consed 572)
>  (intervals_consed 112))
>
>
> ;;; end STOCK UNMODIFIED
>
> ============================
>
> ;;; begin MODIFIED -- CROSSHAIRS "OFF"

> [...]
> ((cons_cells_consed 2408250)
>  (symbols_consed 16120)
>  (strings_consed 112081)
>  (string_chars_consed 2208228)
>  (vector_cells_consed 6903029)
>  (floats_consed 23104)
>  (intervals_consed 112))
>
> ;;; end MODIFIED -- CROSSHAIRS "OFF"
>
> ============================
>
> ;;; begin MODIFIED -- CROSSHAIRS "ON"
>
> [...]
> ((cons_cells_consed 2471395)
>  (symbols_consed 16122)
>  (strings_consed 111473)
>  (string_chars_consed 2209234)
>  (vector_cells_consed 6898322)
>  (floats_consed 19817)
>  (intervals_consed 112))

Your floats look out of control. I checked your latest diff, and found
this:

+  int int_red = XFIXNUM (Ftruncate (make_float (term_red), Qnil));
+  int int_green = XFIXNUM (Ftruncate (make_float (term_green), Qnil));;
+  int int_blue = XFIXNUM (Ftruncate (make_float (term_blue), Qnil));;

Why do you make a Lisp float just to truncate it? Can you run your test
again using one of the following?

https://en.cppreference.com/w/c/numeric/math/round



reply via email to

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