Reputation: 154573
I don't get it, the data produced by json_encode
is much more straightforward than serialize
and yet both the JSON encode and decode functions are much more slower than the serialize
and unserialize
counterparts. Why?
Upvotes: 6
Views: 6360
Reputation: 50622
json_encode
does string parsing and tons of allocs compared to serialize
's memcpy
Have fun in the source if you're really in the mood.
Upvotes: 14