Files
node/lib
Ben Noordhuis 8350f3a3a2 buffer: optimize Buffer#toString()
Break up Buffer#toString() into a fast and slow path.  The fast path
optimizes for zero-length buffers and no-arg method invocation.

The speedup for zero-length buffers is a satisfying 700%.  The no-arg
toString() operation gets faster by about 13% for a one-byte buffer.

This change exploits the fact that most Buffer#toString() calls are
plain no-arg method calls.  Rewriting the method to take no arguments
means a call doesn't go through an ArgumentsAdaptorTrampoline stack
frame in the common case.

PR-URL: https://github.com/nodejs/io.js/pull/2027
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Christian Tellnes <christian@tellnes.no>
Reviewed-By: Daniel Cousens <email@dcousens.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-25 18:32:15 +02:00
..
2015-06-15 16:37:37 +02:00
2015-06-11 20:24:44 +02:00
2015-06-11 20:24:44 +02:00
2015-06-11 20:24:44 +02:00
2015-06-11 20:24:44 +02:00
2015-06-25 18:32:15 +02:00
2015-06-11 20:24:44 +02:00
2015-05-09 12:10:02 +09:00
2015-06-15 16:37:37 +02:00
2015-06-11 20:24:44 +02:00
2015-05-25 10:14:18 -04:00
2015-01-21 16:21:31 -05:00
2015-03-25 22:12:18 +03:00
2015-06-15 16:37:37 +02:00
2015-06-15 16:37:37 +02:00
2015-06-05 22:58:14 -04:00
2015-06-11 20:24:44 +02:00
2015-06-15 16:37:37 +02:00
2015-06-04 11:00:19 +03:00
2015-06-15 16:37:37 +02:00
2015-06-11 20:24:44 +02:00
2015-05-25 10:14:18 -04:00
2015-06-11 20:24:44 +02:00
2015-06-15 16:37:37 +02:00
2015-05-09 12:10:02 +09:00
2015-06-16 16:08:15 -07:00
2015-04-29 19:33:43 +02:00
2015-01-31 23:47:29 -05:00