In PHP, why is json_encode slower than serializing?

I don’t understand, the data obtained using json_encode is much simpler than serialize , and yet the JSON encoding and decoding functions are much slower than the analogs with serialize and unserialize . Why?

+6
json php serialization
source share
1 answer

json_encode performs string parsing and many distributions compared to serialize memcpy

Have fun at the source if you are really in the mood.

+14
source share

All Articles