[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25295: 26.0.50; Represent eieio objects using object-print in backtr
From: |
npostavs |
Subject: |
bug#25295: 26.0.50; Represent eieio objects using object-print in backtraces and edebug |
Date: |
Thu, 02 Mar 2017 07:52:18 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> My experiments seem to indicate that it might
> be "good enough" but it might also suffer from the overhead of
> cl-generic (mostly the fact that a call to a generic-function ends up
> going through some &rest+apply which in cl-print's case end up
> generating a lot of garbage: in one of my tests, the cl-print code was
> twice slower than the C code but the added time was almost entirely
> spent in the GC and that seemed to come exclusively from the lists
> allocated for &rest. I.e. if we could change cl-generic so it doesn't
> use &rest+apply as much there's a chance it could potentially be about
> as fast as the C code).
I have an idea to use this for the pretty printer so it that produces
the correct spacing while printing. I think this would end up faster
than calling indent-sexp afterwards. But it would involve dispatching
on STREAM, and according to the comments in cl-generic.el multiple
dispatch adds more apply calls. Thoughts?