From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
On 2017-12-17 12:44, Philipp Stephani wro= te:
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 result =3D Fnreverse (result);
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 Is there a reason for calling nreverse h= ere?
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> It puts the elements in the same order as the = original JSON. (The Jansson parser also retains the original
>=C2=A0 =C2=A0 =C2=A0> order.)
>=C2=A0 =C2=A0 =C2=A0> This isn't very important, just a bit nice= r and less surprising.
>
>=C2=A0 =C2=A0 =C2=A0It's a potential performance hit, but if you th= ink it's worthwhile,
>=C2=A0 =C2=A0 =C2=A0it'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 per= formance should probably use hashtables anyway.)
Would it make it faster to construct the list in order, instead of construc= ting it in reverse and then reversing it?