emacs-devel
[Top][All Lists]
Advanced

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

Re: Enhancement suggestion: prin1 extension mechanism


From: Stefan Monnier
Subject: Re: Enhancement suggestion: prin1 extension mechanism
Date: Sun, 14 Sep 2008 15:35:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> I fear it'd be difficult to make it work without incurring a significant
>> performance overhead.

> If the table is nil you could use the default hardcoded printer without
> lookups.

In many important cases (e.g. CL has been loaded), the table wouldn't be
nil, and performance should still be good.

> If the entries in the table can be accessed from Lisp code, we could
> remember the default print function for a type before installing a
> custom printer.  E.g. if a vector doesn't have the special symbol in the
> first entry, we could call the previously remembered default printer
> instead of iterating manually over the vector.  Recursive calls to print
> would again use the custom print function.

I don't know what you're talking about.  I'd probably understand better
with a piece of code.

> It seems to me that, compared to testing for circularity, those table
> lookups would only introduce a minor slowdown.

Testing for circularity is indeed too slow right now.  That should be
fixed as well.

> And if someone produces so much output the that it takes to long to
> print, he probably doesn't want to read it anyway :-)

But it's difficult for Emacs to find ou before it's too late.


        Stefan




reply via email to

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