0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/lib
Gareth Ellis 443c2d5442 buffer: changing let in for loops back to var
Using let in for loops showed a regression in 4.4.0. @ofrobots
suggested that we avoid using let in for loops until TurboFan becomes
the default optimiser.

The regression that was detected was when looking at how long it took
to create a new buffer from an array of data.

When using `for (let i=0; i<length; i++) ` we saw the operation take
almost 40% longer compared to `var i=0`.

PR-URL: https://github.com/nodejs/node/pull/5819
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Trevor Norris <trevnorris@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Ref: http://github.com/nodejs/benchmarking/issues/38
2016-03-23 17:44:26 +02:00
..
internal lib: rename /node.js to /bootstrap_node.js 2016-03-22 19:21:20 -04:00
_debug_agent.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
_debugger.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
_http_agent.js https: fix ssl socket leak when keepalive is used 2016-03-17 14:32:49 +02:00
_http_client.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
_http_common.js http: strictly forbid invalid characters from headers 2016-02-09 09:22:09 -08:00
_http_incoming.js http: remove old, confusing comment 2016-02-15 07:52:21 -08:00
_http_outgoing.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
_http_server.js http,util: fix typos in comments 2016-02-17 08:43:40 -08:00
_linklist.js lib,test: deprecate _linklist 2015-10-08 17:32:08 -07:00
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
_stream_transform.js stream: prevent object map change in TransformState 2016-02-02 13:05:04 -06:00
_stream_wrap.js stream_wrap: error if stream has StringDecoder 2015-12-06 21:55:25 -05:00
_stream_writable.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
_tls_common.js tls: scope loop vars with let 2016-01-26 20:53:05 +01:00
_tls_legacy.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
_tls_wrap.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
.eslintrc tools: add buffer-constructor eslint rule 2016-03-18 17:05:18 -07:00
assert.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
buffer.js buffer: changing let in for loops back to var 2016-03-23 17:44:26 +02:00
child_process.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
cluster.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
console.js console: check that stderr is writable 2016-03-15 19:10:55 -07:00
constants.js
crypto.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
dgram.js lib: reduce usage of self = this 2016-03-21 15:48:51 -07:00
dns.js dns: Use object without protoype for map 2016-03-22 11:13:03 -07:00
domain.js lib: reduce usage of self = this 2016-03-21 15:48:51 -07:00
events.js events: add eventNames() method 2016-03-15 09:25:35 -07:00
fs.js fs: add the fs.mkdtemp() function. 2016-03-20 11:49:02 +02:00
http.js lib,src: remove usage of events.EventEmitter 2015-09-23 00:23:08 +05:30
https.js lib: reduce usage of self = this 2016-03-21 15:48:51 -07:00
module.js module: refactor redeclared variable 2016-01-31 19:16:09 +01:00
net.js lib: reduce usage of self = this 2016-03-21 15:48:51 -07:00
os.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
path.js path: assert inputs are strings 2016-03-17 23:20:12 -04:00
process.js
punycode.js
querystring.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
readline.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
repl.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
stream.js lib,src: remove usage of events.EventEmitter 2015-09-23 00:23:08 +05:30
string_decoder.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
sys.js
timers.js timers: fix lint from 4fe02e2 2016-03-21 12:35:12 -04:00
tls.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
tty.js lib: remove unused modules 2015-12-25 13:05:23 -08:00
url.js url: group slashed protocols by protocol name 2016-02-29 20:26:59 -06:00
util.js util: improve format() performance further 2016-03-04 17:27:21 -06:00
v8.js v8,src: expose statistics about heap spaces 2016-01-18 11:44:00 -05:00
vm.js
zlib.js zlib: do not emit event on *Sync() methods 2016-03-19 13:38:26 -07:00