Parsing performance


#1

Hello.

I started writing json encoder/decoder with skookum.
And I measured decoding time on beta version of my json lib.
Unfortunately, I discovered low performance in my opinion.
There is opportunity for improving performance of operations like this?

JSON with 5 symbols is parsing about 0.08ms.
JSON with 50 symbols is parsing about 0.35ms.
JSON with 100 symbols is parsing about 0.6ms.
JSON with 150 symbols is parsing about 1.1ms.
JSON with 200 symbols is parsing about 1.6ms.
JSON with 250 symbols is parsing about 2.1ms.

Thanks.


#2

Is this just for fun? I’m curious why you wouldn’t use the built-in json read/write/serialization stuff in :ue4: e.g. FJsonObject, they even have pretty print.

It’s impossible to say if your results are good or bad since there aren’t any details on your implementation. You might try timing smaller sections of your code until you find the weak point. You can then perhaps post a small piece of code to see if there are any recommendations.

Although this could be an interesting experiment, I wouldn’t put json parser on the list of obviously cool things to implement using :sk:! But hey, go for it, maybe we’ll discover some new optimization guidelines :face_with_monocle:.