Conversation
Member
|
You can use New function |
Member
|
Please remove "dependency review" not sure what that is. |
Collaborator
Author
|
@jsumners ptal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@mcollina
@jsumners
Modified the license, but I personally think it is a reimplementation.
I extended the readme.
Just one remark:
If I would had no limitations, i would have generated a new Function via the Function constructor. That would have been the fastest solution possible. But I assume that this would have resulted in devs complaining about pino breaking in vercel environments and other environments where eval and new Function() is forbidden or removed. If you want I can add such a Function Generator in the next iteration. I dont think it will take much effort to implement that. We have already all lookupArrays for fast string generation. And we have the tokenizer. I guess that would be like 20 more lines(?). Anyhow, i dont know how the heuristics are in vercel and co, and if they throw an Error only by detecting new Function calls?
But I didnt investigated the potential perf gain of such an approach and well... this package is already faster than the original by a magnitude.