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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sandshark

v0.4.1

Published

express.js drop in replacement with raw http performance

Readme

sandshark

  • zero dependencies!
  • aiming for 100% test coverage, currently @ ~70%
  • express.js syntax like with raw http performance
  • setup & middlewares should work right out of the box with your expressjs project
  • this is still "work in progress"!

currently in TODO

  • improving performance for inc. connections (not better than expressjs on benchmark results with keep-alive missing)
  • implement more express apis, a lot of stuff is still missing e.g. res.type(), app.disable()
  • implement custom cookie, query & body parser that can be toggled via config
  • microbench to reach 99,5% performance of raw http module
  • improve test coverage to 100%

run example

  • via npm start

run tests

  • via npm test

run benchmarks

npm run benchmark sandshark
npm run benchmark express
npm run benchmark raw
npm run benchmark restify
npm run benchmark hapi
  • or run all benchmarks in comparison via npm run benchmarks or npm run benchmark all

  • to compare expressjs and sandshark run npm run compare

  • each benchmark will spawn a server and worker making requests in their own child processes

  • the loadtest worker is limited to a single thread and makes at least 2500 requests

  • the benchmarks currently lack additional features such as body parsing, query params, path variables and cookies

  • there is a good chance to have far more place for optimizations

  • since hapi feels rather slow, feel free to send a pull requests if you think that I got something wrong

benchmark results

  • on a MacBook Air 11' 2014 Intel i5 quad @ 1.4 GHz
  • node version 6.5.0 & server modules are present in package.json devDependencies
[
  { raw: 1725 },
  { sandshark: 1692 },
  { express: 1223 },
  { restify: 1084 },
  { hapi: 687 }
]
  • with keep-alive turned off
[
  { express: 488 },
  { raw: 426 },
  { sandshark: 373 },
  { restify: 318 },
  { hapi: 314 }
]

disclaimer

  • i started this project after reading Node Performance hapi vs express vs restify
  • since their benchmarks are from March 2015, i guess they are outdated ;)
  • in their benchmarks raw http performance hits 8500 req/s and express only 3000 req/s
  • my benchmarks actually show expressjs way closer to raw http performance so another guess is that their benchmarks contain possible errors, sadly they have not posted them online

furthermore

  • i would love to have further discussions on this, so please feel free to open issues or hit me up on twitter @silentleave or my website