npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

benchmarks

v0.1.2

Published

Node.JS community benchmarks result sets

Downloads

34

Readme

Node.JS Benchmarks

NPM

Javascript is a non-opinionated language and allows you to do an operation in many ways. This repository tries to find which approach is faster in a range of different systems.

Installation

$ npm install -g benchmarks

Usage

$ node-benchmarks --help
Usage: node-benchmarks [options]
Options:
    -h, --help         output usage information
    -V, --version      output the version number
    -p, --path [path]  Path to output the results to
    -d, --dryrun       Run the benchmark but dont generate files

$ node-benchmarks -p myresults/
[1/21]  type_check
[2/21]  send_buf
[3/21]  manip_recv_buf
[4/21]  duplicate
[5/21]  object_loop
[6/21]  bluebird_vs_q
[7/21]  array_filter
[8/21]  conditional
[9/21]  array_prepend
[10/21] buf_write
[11/21] delete
[12/21] inc_int
[13/21] function_call
[14/21] proto_vs_literal
[15/21] delete_last_item
[16/21] array_map
[17/21] string_search
[18/21] buf_read
[19/21] round_num
[20/21] array_loop
[21/21] str_to_int

Your benchmark results will be appended to the result set.

$ node-benchmarks --dryrun
typeof x 22,545,486 ops/sec ±11.66% (30 runs sampled)
constructor check x 18,023,021 ops/sec ±9.23% (27 runs sampled)
Fastest is typeof

[1/22]  type_check
buffer x 10,889 ops/sec ±15.81% (28 runs sampled)
string+ x 53,569 ops/sec ±21.72% (27 runs sampled)
Fastest is string+

[2/22]  manip_recv_buf
filterDuplicates x 17,466 ops/sec ±7.64% (26 runs sampled)
eliminateDuplicates x 19,910 ops/sec ±7.11% (28 runs sampled)
Fastest is eliminateDuplicates

When --dryrun is used, no files are generated and the results are shown on the console.

Results

You can find the result sets here. I recommend you fork and send a pull requests to add your results to this list.

Contribute

// first fork this repo
$ git clone [email protected]:YOURUSERNAME/node-benchmarks.git
$ cd node-benchmarks
$ npm install
$ bin/node-benchmarks
$ git add .
$ git commit -m 'added new results'
$ git push origin master
// last send pull request

History

Can be seen here.