
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
react-native-benchmark
Advanced tools
React Native benchmarking library inspired by benchmark.js and written in TypeScript.
Warning: This library is work in progess. Use it at your own risk!
npm i -s benchmark-ts
// example/index.ts
import { EventType, Suite } from "../src";
const suite = new Suite;
suite.add('RegExp#test', () => {
/o/.test('Hello World!');
})
.add('String#indexOf', () => {
'Hello World!'.indexOf('o') > -1;
})
.add('String#match', () => {
!!'Hello World!'.match(/o/);
})
.on(EventType.CYCLE, (event) => {
// console.log(event.type, event.target.times);
})
.on(EventType.COMPLETE, (event) => {
// const s:Suite = event.target as Suite
console.log(suite.toString())
})
.run({async: true});
Output for suite.toString() method.
RegExp#test - 2211577 ops/sec ± 2.10%
String#indexOf - 2335987 ops/sec ± 1.96%
String#match - 2046868 ops/sec ± 0.88%
Output for suite.toJSON() method.
{
'RegExp#test': {
moe: 46334.779732633404,
mean: 2211577.4,
rme: 2.0951009778194245,
deviation: 37322.66469908063,
variance: 1392981300.2399998,
sem: 16691.203073715205,
sample: [ 2138299, 2234914, 2228720, 2217517, 2238437 ]
},
'String#indexOf': {
moe: 45836.23559201627,
mean: 2335986.6,
rme: 1.962178875170614,
deviation: 36921.08739785436,
variance: 1363166694.6399999,
sem: 16511.612244962635,
sample: [ 2265366, 2353147, 2372154, 2338449, 2350817 ]
},
'String#match': {
moe: 18031.048282470998,
mean: 2046867.8,
rme: 0.880909274280977,
deviation: 14524.009245384002,
variance: 210946844.56,
sem: 6495.33439570281,
sample: [ 2048837, 2035629, 2025664, 2064410, 2059799 ]
}
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
Thank you to our sponsors:
Copyright (c) 2021 Eugene Hauptmann
FAQs
React Native benchmarking library inspired by benchmark.js
We found that react-native-benchmark demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.