Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
I added most of the comments, will find a way for the GHA @ljharb |
ljharb
left a comment
There was a problem hiding this comment.
this seems to be only running benchmarks in node 20.
what versions should it run on ? |
all of them |
|
Currently, the benchmarking scripts use some modern features (e.g., Array.from, async/await) and rely on tools that are not compatible with 0.8 like Benchmark.js which I use for benchmarking, which only supports node 0.10. So, is compatibility with Node 0.8 for the benchmarking infrastructure is a hard requirement ? @ljharb |
|
I can definitely live with only going down to 0.10. https://npmjs.com/array.from should cover that one, and async/await can be done with Promises instead, which are polyfillable. |
- Implemented parsing benchmarks for various query string formats including simple, nested, and array queries. - Added stringifying benchmarks for different object structures and array formats. - Created a runner to manage benchmark execution and results reporting. - Introduced fixtures for generating test data patterns for benchmarking. - Added functionality to compare current results against baseline benchmarks. - Implemented options for saving current results as baseline and generating summary reports. - Enhanced command-line interface for running benchmarks with various options.
… query retrieval logic
- Deleted outdated benchmark result files to clean up the repository. - Updated the `generateQuery` function in fixtures to handle default size parameter more gracefully. - Added new dependencies for polyfills to support ES6+ features in older Node.js versions. - Removed custom polyfills for Array.from, String.prototype.repeat, Object.fromEntries, and Object.entries, replacing them with well-maintained npm packages. - Updated benchmark runner to improve code readability and maintainability. - Adjusted benchmark commands in package.json for consistency and clarity. - Added new benchmark result file with updated performance metrics for various parsing scenarios.
This reverts commit eb599f5.
…ssignment and change arrow functions to regular functions
|
Hi @ljharb |
Motivation
As discussed here #526 for prformance optimiztions, that there should be a benchmarking infrastructure:
• Execute on every Node.js version in the test matrix
• Prevent future performance regressions
• Provide data-driven evidence for performance claims