--- !ditz.rubyforge.org,2008-03-06/issue title: optimize json encode/decode performance desc: |- Performance of encoding/decoding plain ASCII data (which is often 99+% of JSON encoded data) should be improved. Decoding can take advantage of the fact that a NUL cannot occur inside a valid JSON document. So, as long as the input is NUL terminated, and all syntax checking is correct, an attempt to read beyond the input buffer will cause a syntax error when the NUL is encountered. Explicit bounds checking is thus not necessary at all. Encoding should have a fast path which first ensures that there is enough space to process N input characters safely (taking into account the maximum possible expansion caused by e.g. escaping). Inside the safe loop there is no need to check for output space for each output character. type: :task component: duk release: reporter: sva status: :unstarted disposition: creation_time: 2013-09-10 19:39:08.860112 Z references: [] id: 42b394dbd86284c1b8e15f3f35733ac1efdc7f88 log_events: - - 2013-09-10 19:39:09.081188 Z - sva - created - ""