Skip to content

Instantly share code, notes, and snippets.

@c9s
Created December 22, 2014 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c9s/7c090cd1f43b55344688 to your computer and use it in GitHub Desktop.
Save c9s/7c090cd1f43b55344688 to your computer and use it in GitHub Desktop.
php benchmarks/serializer.php
n=30000
Runing json_encode - . 83464.528488116/s
Runing json_decode - . 59165.647102636/s
Runing serialize - . 76887.615465133/s
Runing unserialize - . 63165.897104579/s
Runing yaml_emit - . 26203.323636738/s
Rate Mem json_encode serialize unserialize json_decode yaml_emit
json_encode 83.46K/s 0B -- -92% -75% -70% -31%
serialize 76.89K/s 0B 108% -- -82% -76% -34%
unserialize 63.17K/s 0B 132% 121% -- -93% -41%
json_decode 59.17K/s 0B 141% 129% 106% -- -44%
yaml_emit 26.2K/s 0B 318% 293% 241% 225% --
================================== Bar Chart ==================================
json_encode 83.46K/s | ████████████████████████████████████████████████████████████ |
serialize 76.89K/s | ███████████████████████████████████████████████████████ |
unserialize 63.17K/s | █████████████████████████████████████████████ |
json_decode 59.17K/s | ██████████████████████████████████████████ |
yaml_emit 26.2K/s | ██████████████████ |
============================== System Information ==============================
PHP Version: 5.5.17
CPU Brand String: Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
With XDebug Extension.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment