[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: Sun, 24 Apr 2011 20:38:40 -0500
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

On Sun, 24 Apr 2011 01:47:36 -0300 Stefan Monnier <address@hidden> wrote: 

TZ> Since hashtables can get pretty big, it would be nice to have a
TZ> separator between entries when they are printed.  Could that be provided
TZ> at the top level, e.g.

TZ> (let ((hash-table-print-separator "\\\n"))
TZ> (format "%S" my-hash-table))

SM> How 'bout changing `pp' instead?

I tried that (thanks for the pointer, I didn't know about it) and it was
MUCH slower than my patch.

Tested against a hashtable with 40K elements.  My patch through `format'
took less than 3 seconds on a modern CPU with enough memory.  `pp' took
a minute before I interrupted it.

I intend to use it for large objects so the performance worries me.


reply via email to

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