From: Philipp Stephani <p.stephani2@gmail.com>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: JSON->lisp Mapping: Hash vs AList
Date: Tue, 19 Dec 2017 17:50:39 +0000 [thread overview]
Message-ID: <CAArVCkSmWOkRhYfhZ5ytZUA6b+U2p0Z8uNnAKUqSBGOpwR6msg@mail.gmail.com> (raw)
In-Reply-To: <49ce1429-228e-a92a-839f-312d6171e896@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]
Clément Pit-Claudel <cpitclaudel@gmail.com> 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.
[-- Attachment #2: Type: text/html, Size: 1531 bytes --]
next prev parent reply other threads:[~2017-12-19 17:50 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-12 1:39 JSON->lisp Mapping: Hash vs AList raman
2017-12-12 13:08 ` Nicolas Petton
2017-12-12 15:52 ` raman
2017-12-13 22:37 ` Philipp Stephani
2017-12-14 0:00 ` T.V Raman
2017-12-14 16:27 ` Eli Zaretskii
2017-12-16 22:24 ` Philipp Stephani
2017-12-17 15:53 ` Eli Zaretskii
2017-12-17 17:44 ` Philipp Stephani
2017-12-17 20:07 ` Eli Zaretskii
2017-12-18 19:55 ` Philipp Stephani
2017-12-18 20:19 ` Eli Zaretskii
2017-12-18 20:59 ` Philipp Stephani
2017-12-19 3:50 ` Vibhav Pant
2017-12-19 17:49 ` Philipp Stephani
2017-12-19 17:08 ` Eli Zaretskii
2017-12-19 17:22 ` Philipp Stephani
2017-12-18 16:15 ` Clément Pit-Claudel
2017-12-19 17:50 ` Philipp Stephani [this message]
2017-12-15 4:13 ` Vibhav Pant
2017-12-16 22:25 ` Philipp Stephani
2017-12-18 20:26 ` [PATCH] Accept alists when serializing JSON Philipp Stephani
2017-12-20 5:58 ` Vibhav Pant
2017-12-22 13:55 ` Philipp Stephani
2017-12-24 17:16 ` Vibhav Pant
2017-12-26 20:46 ` Philipp Stephani
2017-12-24 13:00 ` Philipp Stephani
2017-12-16 22:34 ` JSON->lisp Mapping: Hash vs AList Stefan Monnier
2017-12-16 22:38 ` Philipp Stephani
2017-12-17 0:54 ` Paul Eggert
2017-12-17 2:41 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAArVCkSmWOkRhYfhZ5ytZUA6b+U2p0Z8uNnAKUqSBGOpwR6msg@mail.gmail.com \
--to=p.stephani2@gmail.com \
--cc=cpitclaudel@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).