Clément Pit-Claudel 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.