toJSON vs stringify

Benchmark created by Bill on


Setup

myObj = {
        aosnetuh: "oantehutnehu onteuh notehu",
        onetuhe: "ontehuntoehu",
        onthNtheounth: {
            onteuhonetuh: 'onetuhoeu',
            ontehunteh: 123
        }
    };

Test runner

Ready to run.

Testing in
TestOps/sec
toJSON
Object.toJSON( myObj )
ready
stringify
JSON.stringify( myObj )
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.