Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Leveldb | 33,852 | 4 | 24 days ago | 4 | June 24, 2021 | 300 | bsd-3-clause | C++ | ||
LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values. | ||||||||||
Fastify | 29,154 | 1,131 | 2,918 | 2 days ago | 273 | October 19, 2023 | 87 | other | JavaScript | |
Fast and low overhead web framework, for Node.js | ||||||||||
Fasthttp | 20,409 | 645 | 3,463 | 2 days ago | 186 | November 12, 2023 | 86 | mit | Go | |
Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http | ||||||||||
Benchmarkdotnet | 9,604 | 1,125 | 143 | 3 days ago | 65 | November 01, 2023 | 215 | mit | C# | |
Powerful .NET library for benchmarking | ||||||||||
Frameworkbenchmarks | 7,195 | 8 hours ago | 142 | other | Java | |||||
Source for the TechEmpower Framework Benchmarks project | ||||||||||
Bigcache | 6,902 | 206 | 715 | a day ago | 35 | October 24, 2022 | 88 | apache-2.0 | Go | |
Efficient cache for gigabytes of data written in Go. | ||||||||||
Web Frameworks | 6,793 | 9 hours ago | 13 | April 27, 2021 | 195 | mit | PHP | |||
Which is the fastest web framework? | ||||||||||
Criterion.rs | 3,867 | 245 | 4,423 | 8 days ago | 25 | May 26, 2023 | 149 | apache-2.0 | Rust | |
Statistics-driven benchmarking library for Rust | ||||||||||
Yet Another Bench Script | 2,995 | 5 days ago | 3 | wtfpl | Shell | |||||
YABS - a simple bash script to estimate Linux server performance using fio, iperf3, & Geekbench | ||||||||||
Jquery Dynatable | 2,788 | 5 years ago | 1 | March 31, 2015 | 232 | other | JavaScript | |||
A more-fun, semantic, alternative to datatables |
This is a set of benchmarks focusing on the performance of Postgres client libraries for Node.js. The benchmarks are primarily direct selects of values to measure the input-output performance and not the Performance of postgres data fetching.
NB. In daily usage it is very likely that this difference doesn't matter as much since the time spent by the client library is negligable compared to the query time itself.
Currently benchmarked libraries are
These are the results from running the benchmarks on a Macbook Pro 2,9 GHz Quad-Core Intel Core i7 with a default Postgres 12.6 installation and Node 12.20.1. The time is the average of 5 rounds, running the queries 10,000 times after some warmup rounds.
client | select | select_arg | select_args | select_where |
---|---|---|---|---|
Postgres.js | 0.100s (4.8x) | 0.105s (7.4x) | 0.231s (4.3x) | 0.233s (5.1x) |
pg-promise | 0.360s (1.3x) | 0.427s (1.8x) | 0.662s (1.5x) | 0.801s (1.5x) |
pg-promise-native | 0.371s (1.3x) | 0.435s (1.8x) | 0.673s (1.5x) | 0.807s (1.5x) |
pg | 0.322s (1.5x) | 0.611s (1.3x) | 0.815s (1.2x) | 1.057s (1.1x) |
pg-native | 0.479s (1.0x) | 0.551s (1.4x) | 0.885s (1.1x) | 1.183s (1.0x) |
slonik | 0.453s (1.1x) | 0.773s (1.0x) | 0.992s (1.0x) | 1.108s (1.1x) |
lower is better
select 1 as x
select $1 as x
-- $1 is just 1
select
$1 as int,
$2 as string,
$3 as timestamp,
$4 as null,
$5 as boolean,
$6 as bytea,
$7 as json
--$1 = 1337
--$2 = 'wat'
--$3 = new Date()
--$4 = null
--$5 = false
--$6 = Buffer.from('awesome')
--$7 = "[{ "some": "json" }, { "array": "object" }]"
select * from pg_catalog.pg_type where typname = $1
--$1 = 'bool'
Ensure you have a PostgreSQL server running. You can add connection details using environment vars PGDATABASE, PGUSER etc.
npm install
npm start