4 ms·
It make sense if you think about it, but I would really not figure it out myself, that is true.
by czechdeveloper 7y ago
It make sense if you think about it, but I would really not figure it out myself, that is true.
- mordechai9000 7y agoI read the comments before the article, and it took me a minute to figure out why: Of course, JSON is much simpler to parse than JS. For anything large enough to matter, I think you'd want to deliver it as an application/json blob, anyway. Or use protobuf.
- blondin 7y agoindeed! and i was going to say the same thing. it makes perfect sense if you are a programmer with a basic understanding of how languages work. but like someone else said, i would not have thought about it first thing when writing code.
- yyyk 7y agoPerhaps the reason many (like myself) did not immediately expect the speedup is that they started on or are still using another non-scripting programming languages. There, the language parsing penalty is paid during the compile step, and as far as a user is concerned the object approach is obviously faster than parsing from JSON. This does leave me wandering - is the result here applicable to other scripting languages too? The argument in the article would seem to apply in the general case, but perhaps other languages have some particularities that change the result.