aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMark Pulford <mark@kyne.com.au>2011-05-03 00:39:41 +0930
committerMark Pulford <mark@kyne.com.au>2011-05-03 00:39:41 +0930
commita9bb5006d228539a1ec5028df7f660f862b0f2cc (patch)
tree3216f31e1e0d7479dd024108c7a809b31335eead /Makefile
parentb07c4162f4e1c5056e73500147a17f4e63abaaf4 (diff)
downloadlua-cjson-a9bb5006d228539a1ec5028df7f660f862b0f2cc.tar.gz
lua-cjson-a9bb5006d228539a1ec5028df7f660f862b0f2cc.tar.bz2
lua-cjson-a9bb5006d228539a1ec5028df7f660f862b0f2cc.zip
Implement minor performance improvements
- Use strbuf_append_mem() for small static strings (~2% speedup). - Use &json_config_key for storing registry data. It's more unique and faster than a text string. - Use strbuf_append_char_unsafe() for string quotes (~4% speedup). - Use strbuf_append_number() instead of strbuf_append_fmt(). It is much simpler and avoids the potential for 2 expensive calls to vsnprintf(). - Make encoding buffer persistent across calls to avoid extra malloc/free (~4% speedup on example2.json). These performance improvements can be much more pronounced depending on the data. Eg, small strings, numbers, booleans, etc..
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions