[Top][All Lists]

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

Re: list-print-separator

From: Ted Zlatanov
Subject: Re: list-print-separator
Date: Mon, 25 Apr 2011 10:01:17 -0500
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

On Mon, 25 Apr 2011 11:51:46 -0300 Stefan Monnier <address@hidden> wrote: 

SM> Hmm... I wouldn't try to compare the speed of `print' with that of `pp'
SM> since they do very different amounts of work and are implemented in
SM> languages whose performance is very different, but there's clearly room
SM> for improvement in pp's speed.
>> I want to print out a large ELisp data structure prettily.  The Gnus
>> newsrc.eld, for example, or the Gnus registry hashtable.  I'll use
>> whatever makes it happen as fast as possible.

SM> The newsrc.eld has never been pretty and it's never been a problem,

It's unreadable without newlines so you need manual fixups to look at it
when things go wrong.

SM> Not sure what's the "Gnus registry", so I can't comment on that.

It's a large hashtable with lots of alist members.

>> With my list-print-separator patch you get fast and OK-looking.
>> Are you concerned it's only useful sometimes?  The speed penalty is
>> minor if it's not used.

SM> I'd rather make `pp' faster, or if it's too difficult split it into
SM> a "print-really-pretty" and "print-quickly-and-not-too-ugly".

The users most likely to benefit, at least for Gnus where I have
experience supporting them, are those who can't read ELisp well.  They
are also less likely to complain or roll their own solution.  So I hope
you see that this is not a "print pretty" request but a real need for
any package that uses ELisp's build-in serialization.  I'm concerned
that your "good enough" solution will not be adopted because it will be
much slower than the native `print' serialization, and optimizing it is
much more work than my proposed patch of 4 lines.


reply via email to

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