Created
September 5, 2014 13:17
-
-
Save eMaringolo/5e7c865188036faa7202 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Compares the parse speed of three different JSON parsers." | |
{'file1.json'. 'file2.json'. 'file3.json' } do: [ :filename | | |
jsonString := fileName asFileReference contents. | |
Transcript cr; show: jsonString size printString, 'bytes JSON:'; cr. | |
Transcript show: 'NeoJSON: '; show: [ NeoJSONReader fromString: jsonString] bench; cr. | |
Transcript show: 'JSON: '; show: [Json readFrom: jsonString readStream ] bench; cr. | |
Transcript show: 'WAJsonParser: '; show: [WAJsonParser parse: jsonString] bench; cr. | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment