aboutsummaryrefslogtreecommitdiffstats
path: root/doc/coding_style.md
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-12-28 06:18:58 +0100
committerKim Alvefur <zash@zash.se>2019-12-28 06:18:58 +0100
commit021483a5cf67080a064f4ed47615e3f70f671ce0 (patch)
treebb561987b123cc8e7b6681b02ac0ebc29fcb9b3c /doc/coding_style.md
parentb45916aaad3ac0474811c8ca3584f623e8ed0282 (diff)
downloadprosody-021483a5cf67080a064f4ed47615e3f70f671ce0.tar.gz
prosody-021483a5cf67080a064f4ed47615e3f70f671ce0.zip
net.server_epoll: Avoid concatenating buffer with single item
Saves creating a string that'll be identical to buffer[1] anyways, as well as a C function call. Depending on Lua version and length of the string, this could be reusing an interned string, but a longer one would probably be duplicated for no reason. Having exactly one item in the buffer seems like it would be fairly common, but I have not done an extensive study. If opportunistic writes are enabled then it will be even more likely. This special case could be optimized like this in table.concat but it does not look like it is.
Diffstat (limited to 'doc/coding_style.md')
0 files changed, 0 insertions, 0 deletions