reduce the number of internal functions#1270
Conversation
There was a problem hiding this comment.
Is this change controversial? I don't think we should document the fact that R.add happens to operate on strings: R.concat performs that function.
src/addIndex.js
Outdated
There was a problem hiding this comment.
This may be a perf regression
There was a problem hiding this comment.
How about this?
var args = _slice(arguments);
args[0] = indexedFn;
return fn.apply(this, args);There was a problem hiding this comment.
Meh, I'm still not a big fan of the addIndex functions (too hacky and can't be extended for addKey). I'd still rather see the Index/Key functions be the default and the none key/index functions just apply unary on the predicate. But I'll try not to derail on this tangent, my thoughts are already in other threads
There was a problem hiding this comment.
Actually, this change is fine as is, I didn't realize it's only applied once
There was a problem hiding this comment.
Does this get the @megawac seal of approval? :)
There was a problem hiding this comment.
I thought we tested that approach and the concat one was faster. But it's only vague memories now, I'm afraid.
There was a problem hiding this comment.
I'd be very surprised if that was the case
|
I'm concerned about the performance hits for functions like |
8f49265 to
c4255ec
Compare
|
💯 I'm very much in favor of this. If there are perf regressions, I'm bothered only if they're substantial (not that I have a precise figure in mind.) I love the code clean-up this entails. |
|
it might be nice to capture some data on the cost so that someone can circle back later if necessary |
|
@megawac, I've reinstated |
reduce the number of internal functions
There are currently a small number of functions defined in src/internal but never used. This pull request removes the unused files.
There are currently several cases where src/internal/_foo.js exists only for src/foo.js to be defined as
curry(_foo). This pull request coalesces each such pair of files.This pull request takes additional reasonable measures to reduce the number of files in src/internal.