emacs-devel
[Top][All Lists]
Advanced

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

Re: JSON->lisp Mapping: Hash vs AList


From: Philipp Stephani
Subject: Re: JSON->lisp Mapping: Hash vs AList
Date: Tue, 19 Dec 2017 17:50:39 +0000



Clément Pit-Claudel <address@hidden> schrieb am Mo., 18. Dez. 2017 um 17:15 Uhr:
On 2017-12-17 12:44, Philipp Stephani wrote:
>     >  > +              result = Fnreverse (result);
>     >
>     >  Is there a reason for calling nreverse here?
>     >
>     > It puts the elements in the same order as the original JSON. (The Jansson parser also retains the original
>     > order.)
>     > This isn't very important, just a bit nicer and less surprising.
>
>     It's a potential performance hit, but if you think it's worthwhile,
>     it's fine with me.
>
> I don't care much. For now I'd leave it in, we can take it out later if it hurts performance too much. (Though people that care about performance should probably use hashtables anyway.)

Would it make it faster to construct the list in order, instead of constructing it in reverse and then reversing it?

I haven't measured it. Feel free to measure whether one of the three methods (the current one, yours, inverted order) is significantly faster than the others, and send a patch if yes.

reply via email to

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