[haXe] Ugly serializer bug

Nicolas Cannasse ncannasse at motion-twin.com
Tue Dec 4 13:58:21 CET 2007


Michael Pliskin a écrit :
> Hello Nicolas,
> 
> NC> Well, one possibility would be to iterator over __keys__ result but that
> NC> would be quite inneficient. So I guess, i'll have to add a __skeys__
> NC> that generates bytecode that strip the first char out of keys. This will
> NC> be an additional call per key but I don't see any other solution.
> 
> So you want to do that on compiler level? Ok, this is probably faster.
> 
> Another solution is just to check explicitly for "constructor" and
> "__proto__" keys and keep them in special variables - not sure which
> one is faster in fact (how fast is switch over strings).

There's many of them to test, one by one, so it's better+faster to use a 
key prefix.

Best,
Nicolas



More information about the Haxe mailing list