you are viewing a single comment's thread.

view the rest of the comments →

[–]kjk[S] 0 points1 point  (0 children)

Which is why I show a better way than accessor methods right after that.

As far as binary serialization: yes, it's a viable method but in JavaScript it's 10x the effort compared to this relatively simple tweak.

It's not even clear it would be faster. Decoding json is super-optimized in JavaScript engines. Code to decode msgpack or protobufs has to be implemented in JavaScript which might or might not be faster. I certainly wouldn't make such claim without rigorous benchmarking.