Thanks Raphael and Norris. This is great news.

I've just built the latest CVS HEAD and ran a benchmark of
JSON.stringify vs a server-side version of Prototype's Object.toJSON.

On an array of 2082 objects:

JSON.stringify: 2028ms
Prototype's Object.toJSON: 1894ms

These test results seem consistent across different data sets. Surely
the native JSON.stringify would be faster than Object.toJSON? Have I
done something wrong?

In addition, saving the results to a text file:

JSON.stringify yields: "[{\"associateId\": 0,... etc.
Object.toJSON yields: ["associateId": 0,... etc.

In other words, JSON.stringify yields a string literal of a JSON
string whereas Object.toJSON yields a JSON string.
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to