Closed nazar-pc closed 2 years ago
Found this in CPU-bound application, should help significantly when called often.
Did you actually measure the performance improvement? V8 is often able to inline this anyway, so from experience, whether they are inline or top-level matter very little.
You'll also need to come up with some better names for the variables for this to be mergable.
Did you actually measure the performance improvement? V8 is often able to inline this anyway, so from experience, whether they are inline or top-level matter very little.
I do not have a reproducible benchmark. This library is used as dependency of the other library and I found during profiling that a non-negligible amount of time was spent in this library. After changes from this PR I have not seen library doing significant contributions. One would expect something like this to be optimized, but I don't think V8 is doing that right now.
You'll also need to come up with some better names for the variables for this to be mergable.
I am not familiar with the library at all, so I have no idea what those things do and what they should be called unfortunately.
I am not familiar with the library at all, so I have no idea what those things do and what they should be called unfortunately.
You could infer it by reading the regex and looking at the context.
Found this in CPU-bound application, should help significantly when called often.
I am not familiar with the library, would be nice if someone renames variables to something more meaningful.