summaryrefslogtreecommitdiff
path: root/benchmark
AgeCommit message (Collapse)Author
2015-12-02meta: remove use of profanity in sourceMyles Borins
The CoC requests to avoid the casual use of profanity. PR-URL: https://github.com/nodejs/node/pull/4122 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2015-10-07src: replace naive search in Buffer::IndexOfKarl Skomski
Adds the string search implementation from v8 which uses naive search if pattern length < 8 or to a specific badness then uses Boyer-Moore-Horspool Added benchmark shows the expected improvements Added option to use ucs2 encoding with Buffer::IndexOf Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> PR-URL: https://github.com/nodejs/node/pull/2539
2015-09-29benchmark: update comment in common.jsMinwoo Jung
Very minor update in benchmark/common.js Not exactly a critical change, just continued cleaning out of old joyent/node PRs that never landed. Ref: https://github.com/nodejs/node-v0.x-archive/pull/8515 PR-URL: https://github.com/nodejs/node/pull/2399 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-09-15doc: rename from iojs(1) to node(1) in benchmarksDmitry Vasilyev
Examples in the benchmark readme previously sill referenced iojs(1). PR-URL: https://github.com/nodejs/node/pull/2884 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-09-06src: replace usage of v8::Handle with v8::LocalMichaël Zasso
v8::Handle is deprecated: https://codereview.chromium.org/1224623004 PR-URL: https://github.com/nodejs/io.js/pull/2202 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-08-23node: rename from io.js to nodecjihrig
This commit replaces instances of io.js with Node.js, based on the recent convergence. There are some remaining instances of io.js, related to build and the installer. Fixes: https://github.com/nodejs/node/issues/2361 PR-URL: https://github.com/nodejs/node/pull/2367 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
2015-08-20events: deprecate static listenerCount functionSakthipriyan Vairamani
As per the discussion in #734, this patch deprecates the usage of `EventEmitter.listenerCount` static function in the docs, and introduces the `listenerCount` function in the prototype of `EventEmitter` itself. PR-URL: https://github.com/nodejs/node/pull/2349 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2015-07-26benchmark: add remaining path benchmarks & optimizeNathan Woltman
As a follow-up to 0d15161, this commit adds benchmarks for the rest of the path functions and also forces V8 to optimize the functions before starting the benchmark test. PR-URL: https://github.com/nodejs/io.js/pull/2103 Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-07-25src: make base64 decoding 50% fasterBen Noordhuis
Make the inner loop execute fewer compare-and-branch executions per processed byte, resulting in a 50% or more speedup. This coincidentally fixes an out-of-bounds read: while (unbase64(*src) < 0 && src < srcEnd) Should have read: while (src < srcEnd && unbase64(*src) < 0) But this commit removes the offending code altogether. Fixes: https://github.com/nodejs/io.js/issues/2166 PR-URL: https://github.com/nodejs/io.js/pull/2193 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-07-04benchmark: Add some path benchmarks for #1778Nathan Woltman
Path functions being benchmarked are: * format * isAbsolute * join * normalize * relative * resolve PR-URL: https://github.com/nodejs/io.js/pull/1778 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2015-06-29benchmark: make concurrent requests configurableRich Trott
In http_bench.js, allow the concurrent requests per client to be configurable. This also changes the launch of clients to wait until all forked servers are online. This eliminates spurious error messages at the start of the run. PR-URL: https://github.com/nodejs/io.js/pull/2068 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-29benchmark: fix typo in READMERich Trott
PR-URL: https://github.com/nodejs/io.js/pull/2067 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-06-25buffer: optimize Buffer#toString()Ben Noordhuis
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-24doc: clarify prerequisites in benchmark/README.mdJeremiah Senkpiel
PR-URL: https://github.com/nodejs/io.js/pull/2034 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-15doc: benchmark/README.md copyeditRich Trott
PR-URL: https://github.com/nodejs/io.js/pull/1970 Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-05-22buffer: optimize Buffer.byteLengthBrendan Ashworth
Buffer.byteLength is important for speed because it is called whenever a new Buffer is created from a string. This commit optimizes Buffer.byteLength execution by: - moving base64 length calculation into JS-land, which is now much faster - remove redundant code and streamline the UTF8 length calculation It also adds a benchmark and better tests. PR-URL: https://github.com/nodejs/io.js/pull/1713 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-01node: improve nextTick performanceBrian White
This commit uses separate functions to isolate deopts caused by try-catches and avoids fn.apply() for callbacks with small numbers of arguments. These changes improve performance by ~1-40% in the various nextTick benchmarks. PR-URL: https://github.com/iojs/io.js/pull/1571 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-04-09benchmark: don't check wrk in non-http benchmarkJackson Tian
When running a non-http benchmark, there is no need the check for the wrk tool so move the wrk check into the http method. PR-URL: https://github.com/iojs/io.js/pull/1368 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-04-04benchmark: add rsa/aes-gcm performance testShigeki Ohtsu
PR-URL: https://github.com/iojs/io.js/pull/1325 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-04-04benchmark: add/remove hash algorithmShigeki Ohtsu
add sha1, sha512 algorithm and remove md5 PR-URL: https://github.com/iojs/io.js/pull/1325 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-04-03benchmark: fix chunky client benchmark executionBrian White
This commit fixes a few things for this benchmark: 1. Ensures the temporary directory for the unix socket exists. 2. Prevents the client code from being run directly because the server script is the one that calls out the client code. 3. Ensures the server is closed once the client benchmarks have finished. 4. Since this is an http benchmark, it should be moved to the http benchmarks subdirectory. PR-URL: https://github.com/iojs/io.js/pull/1257 Reviewed-By: Roman Reiss <me@silverwind.io>
2015-03-25string_decoder: optimize write()Brian White
By limiting property getting/setting to only where they are absolutely necessary, we can achieve greater performance especially with small utf8 inputs and any size base64 inputs. PR-URL: https://github.com/iojs/io.js/pull/1209 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Nicu Micleușanu <micnic90@gmail.com> Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-03-16benchmark: add output format option [csv]Brendan Ashworth
This commit adds an `OUTPUT_FORMAT` environment variable option for all benchmark tests that allow either 'csv' or 'default' output. Default output has been left unchanged, and csv output prints out the csv headers along with the csv formatted per-test output, each test also seperated by a newline. It can be used like the following: $ OUTPUT_FORMAT=csv iojs benchmark/common.js http Not specifying the OUTPUT_FORMAT env var will default to 'default'. Specifying a bad value will throw an error. PR-URL: https://github.com/iojs/io.js/pull/777 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-03-16benchmark: add plot_csv R graphing scriptBrendan Ashworth
This commit adds a graphing script (in R) for graphing the CSV output of a benchmark. It can be run like this: ``` $ OUTPUT_FORMAT=csv iojs benchmark/http/client-request-body.js > data.csv $ ./benchmark/plot_csv.R data.csv graph.png bytes type ``` This will graph the output to `graph.png`, using the output's `bytes` value as X and the result value for each as Y. Output will be grouped by `type`. Running as the example yields a beautiful graph like this: http://pbrd.co/1vBhUfy. PR-URL: https://github.com/iojs/io.js/pull/777 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-03-09benchmark: chunky http client benchmark variationRudi Cilibrasi
PR-URL: https://github.com/iojs/io.js/pull/228 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-03-05benchmark: fix `wrk` checkBrian White
PR-URL: https://github.com/iojs/io.js/pull/1076 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-03-04benchmark: check for wrk ahead of running benchmarksJohan Bergström
PR-URL: https://github.com/iojs/io.js/pull/982 Reviewed-By: Rod Vagg <rod@vagg.org>
2015-03-04build: remove tools/wrk from the treeJohan Bergström
wrk is an optional tool that some of the http benchmarks uses. The removal doesn't affect any users. Developers are assumed to install it before running the tests. This change reduces the tarball by 5% PR-URL: https://github.com/iojs/io.js/pull/982 Reviewed-By: Rod Vagg <rod@vagg.org>
2015-02-24benchmark: pass execArgv to the benchmarking processPetka Antonov
Benchmarker should pass exec flags (e.g. --no-crankshaft, --turbofan-filter, --trace-opt etc) to the benchmarking process Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> PR-URL: https://github.com/iojs/io.js/pull/928
2015-02-14benchmark: add a few querystring benchmarksBrian White
PR-URL: https://github.com/iojs/io.js/pull/847 Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-02-07benchmark: bump eventemitter number of iterationsBen Noordhuis
Some of the benchmarks that were added in commit 847b9d2 complete too quickly to draw meaningful conclusions from. Increase the number of iterations to make them run longer. PR-URL: https://github.com/iojs/io.js/pull/746 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-02-06benchmark: add more EventEmitter benchmarksBrian White
PR-URL: https://github.com/iojs/io.js/pull/730 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-02-04benchmark: allow compare via fine-grained filtersBrian White
Before this commit, only benchmark targets defined in Makefile could be used. This commit allows execution of common.js directly and passing of filter arguments directly, allowing you to run either a subset of benchmarks or a single specific benchmark for comparison. PR-URL: https://github.com/iojs/io.js/pull/711 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-02-04benchmark: don't use template stringsEvan Lucas
When running benchmark/compare.js, it is typical to run a version of node that does not support template strings. This provides backwards compatibility for comparing benchmarks using older versions of node. PR-URL: https://github.com/iojs/io.js/pull/714 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-02-02benchmark: clean up common.jsBrendan Ashworth
This commit cleans up `benchmark/common.js` with a few generic changes such as the following: - declare all `require()`'d libraries at the top instead of in the middle - add some empty whitespace where it helps readability - changes ambiguous variable names - standardizes most if / else blocks - missing semicolons PR-URL: https://github.com/iojs/io.js/pull/662 Reviewed-By: Nicu Micleușanu <micnic90@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2015-01-30benchmark: remove extra spacing in http optionsBrendan Ashworth
This commit removes the benchmark spacing modification in `client-request-body.js` and `end-vs-write-end.js` which adds two spaces to the end of some variables to make sure the lines line up. The reason behind this is that its totally pointless (the lines don't actually line up with it) and it disallows you to parse the output with a tool like awk, or at least makes it a lot harder. PR-URL: https://github.com/iojs/io.js/pull/650 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-01-28doc: add more info to benchmark/README.mdFishrock123
Adds info on the `wrk` prerequisite for http benchmarks and how to run benchmarks with options. PR-URL: https://github.com/iojs/io.js/pull/629 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-01-28buffer: implement `iterable` interfaceVladimir Kurchatkin
This makes possible to use `for..of` loop with buffers. Also related `keys`, `values` and `entries` methods are added for feature parity with `Uint8Array`. PR-URL: https://github.com/iojs/io.js/pull/525 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-21benchmark: print score to five decimal placesYosuke Furukawa
PR-URL: https://github.com/iojs/io.js/pull/516 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-18benchmark: fix tcp bench after internal api changeYosuke Furukawa
Fix up the tcp raw benchmarks after an internal API change. PR-URL: https://github.com/iojs/io.js/pull/495 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-18benchmark: stop v8 benchmark clobbering RegExpBen Noordhuis
deps/v8/benchmarks/regexp.js clobbers the RegExp global, breaking util.format() and console.log(). Unclobber it to keep the other benchmarks working. Fixes the following error when running benchmark/misc/v8-bench.js: $ out/Release/iojs benchmark/misc/v8-bench.js util.js:84 if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { ^ TypeError: object is not a function at Object.exports.debuglog (util.js:84:9) at timers.js:12:29 at NativeModule.compile (node.js:800:5) at NativeModule.require (node.js:769:18) at net.js:5:14 at NativeModule.compile (node.js:800:5) at NativeModule.require (node.js:769:18) at tty.js:4:11 at NativeModule.compile (node.js:800:5) at Function.NativeModule.require (node.js:769:18) This could alternatively be addressed by caching the RegExp global in lib/util.js. That's not a bad approach and I considered it but doing it for just RegExp and not other globals would be half-baked. Maybe the more thorough approach where we cache all globals at start-up is something for a follow-up pull request. Fixes: https://github.com/iojs/io.js/pull/475 PR-URL: https://github.com/iojs/io.js/pull/489 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
2015-01-17benchmark: add filter option for benchmarkYosuke Furukawa
Before: # common.js executes all tests in net directory. $ ./iojs common.js net After: # common.js executes only "dgram" tests in net directory. $ ./iojs common.js net dgram PR-URL: https://github.com/iojs/io.js/pull/488 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-14benchmark: fix command name in benchmark scriptsYosuke Furukawa
PR-URL: https://github.com/iojs/io.js/pull/410 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-12Remove excessive copyright/license boilerplateisaacs
The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
2014-12-20lib: micro-optimize url.resolve()Ben Noordhuis
Replace the call to Array#splice() with a faster open-coded version that creates less garbage. Add a new benchmark to prove it. With the change applied, it scores about 5% higher and that is nothing to sneeze at. PR-URL: https://github.com/iojs/io.js/pull/184 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-20benchmark: rename url.parse() benchmarkBen Noordhuis
Rename the url.parse() benchmark from url.js to url-parse.js. A follow-up commit is going to add another one for url.resolve(). PR-URL: https://github.com/iojs/io.js/pull/184 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-20lib: micro-optimize EventEmitter#removeListener()Ben Noordhuis
Replace the call to Array#splice() with a faster open-coded version that creates less garbage. Add a new benchmark to prove it. With the change applied, it scores a whopping 40% higher. PR-URL: https://github.com/iojs/io.js/pull/185 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-20benchmark: fix printing of large numbersBen Noordhuis
Don't use Number#toPrecision(), it switches to scientific notation for numbers with more digits than the precision; use Number#toFixed(). PR-URL: https://github.com/iojs/io.js/pull/185 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-19benchmark: pre-optimize url.parse() before startBen Noordhuis
Force V8 to optimize url.parse() before starting the actual benchmark. Tries to minimize variance between successive runs caused by the optimizer kicking in at different points. It does not seem to have much impact, CPU times are roughly the same before and afterwards; url.parse() quickly plateaus at a local optimum where most time is spent in V8 builtins, notably Runtime_StringSplit() and Object::GetElementWithReceiver() calls originating from deps/v8/src/uri.js, with no recurring optimize/deoptimize cycles that I could spot. Still, I don't see any downsides to pre-optimizing the function being benchmarked so in it goes. PR-URL: https://github.com/iojs/io.js/pull/132 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-12-19fs: deprecate exists() and existsSync()cjihrig
These methods don't follow standard conventions, and shouldn't be used anyway. Fixes: https://github.com/iojs/io.js/issues/103 PR-URL: https://github.com/iojs/io.js/pull/166 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>