0.0.141 • Published 6 years ago

fast-curry v0.0.141

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

fast-curry

npm

npm

simple fast curry implementation inspire by ramda and @riim/curry

Usage

var curry = require('fast-curry');

var sum = curry(function(a, b) { return a + b; });
var addOne = sum(1);

console.log(addOne(2));
// => 3

Benchmark (nodejs v7.3.0 | macOS | 2.2 GHz Intel Core i7)

Benchmark sources can be found in the folder

Create - sum = curry((a, b) => a + b) - least important result

Lift - addOne = sum(1)

Call - addOne(2) - much more important result than the previous two

Results in K ops/sec.

LibraryCreateLiftCall
fast-curry11,381,1828,833,22819,496,006
ramda/R.curry7,247,7968,294,71012,819,816
@riim/curry3,460,0897,929,3353,605,139
curry14,404,0012,596,5611,665,675
cast-curry8,831,0081,127,9582,498,141
just-curry5,008,9611,555,0591,453,120
auto-curry3,673,7061,487,6741,230,014
light-curry23,778,5085,122,7042,037,435
@thisables/curry751,4301,466,132976,244
@ibrokethat/curry16,650,9132,270,7495,113,183
instant-curry25,928,5263,904,82313,582,536
fj-curry15,964,7143,035,8762,264,332
curry-d10,620,7882,122,7691,735,257

Reference