
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
The fastest Function#bind
I could find.
Function#bind (native) x 709,955 ops/sec ±1.79% (84 runs sampled)
Function#bind (slice) x 2,610,293 ops/sec ±1.43% (99 runs sampled)
Function#bind (concat) x 2,622,574 ops/sec ±0.79% (101 runs sampled)
Function#bind (loop) x 2,952,311 ops/sec ±1.63% (95 runs sampled)
Fastest is Function#bind (loop)
4.16x as fast as Function#bind (native)
npm install fast-bind
Function.prototype.bind = require('fast-bind')
The previous version did not handle using the bound function as a constructor. This requires an instanceof check, and slows everything down a bunch.
Function#bind (native) x 803,410 ops/sec ±2.35% (79 runs sampled)
Function#bind (slice) x 4,771,960 ops/sec ±0.95% (99 runs sampled)
Function#bind (concat) x 3,838,614 ops/sec ±1.41% (95 runs sampled)
Function#bind (loop) x 6,440,278 ops/sec ±0.69% (97 runs sampled)
Fastest is Function#bind (loop)
8.02x as fast as Function#bind (native)
FAQs
the fastest version of Function#bind I could make
The npm package fast-bind receives a total of 78,452 weekly downloads. As such, fast-bind popularity was classified as popular.
We found that fast-bind 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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.