buffer: improve {read,write}{U}Int* methods
authorNick Apperson <apperson@gmail.com>
Tue, 25 Mar 2014 14:51:13 +0000 (09:51 -0500)
committerTrevor Norris <trev.norris@gmail.com>
Mon, 23 Jun 2014 23:58:55 +0000 (16:58 -0700)
commitee95e4f5f76cc2ac637ab53056a7c514bc49e13c
tree164ddb8b0d8f75a324e1473b2c706f368e50b171
parent72dcc26c7af47fff906123f1afb3510a0c22b28c
buffer: improve {read,write}{U}Int* methods

Increase the performance and simplify the logic of Buffer#write{U}Int*
and Buffer#read{U}Int* methods by placing the byte manipulation code
directly inline.

Also improve the speed of buffer-write benchmarks by creating a new
call directly to each method by using Function() instead of calling by
buff[fn].

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Conflicts:
lib/buffer.js
benchmark/buffers/buffer-read.js
benchmark/buffers/buffer-write.js
lib/buffer.js