Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request adds benchmarking capabilities to compare the performance of the IP address library against other popular alternatives in the ecosystem. The changes include performance optimizations to the IPv4 validation logic and the addition of comprehensive benchmarking infrastructure.
- Optimizes IPv4 format validation using regex for better performance
- Adds benchmarking infrastructure to compare against other IP libraries
- Includes comprehensive performance test scripts and documentation
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/main/ts/core.ts |
Optimizes IPv4 validation with regex pattern matching |
target/esm/core.mjs |
Compiled output with IPv4 validation optimization |
target/cjs/core.cjs |
Compiled output with IPv4 validation optimization |
src/test/bench/stand/index.ts |
Adds benchmarking test suite comparing multiple IP libraries |
src/scripts/build-bench-md.ts |
New script to generate performance comparison documentation |
src/scripts/build-coherence-md.ts |
Updates coherence testing to export suites for benchmarking |
src/test/js/export.test.js |
Adds test for normalizeToLong function export |
package.json |
Adds browser export field and benchmark build scripts |
README.md |
Updates documentation to reference benchmark results |
COHERENCE.md |
Updated coherence comparison with new library entry |
BENCHMARK.md |
New performance comparison documentation |
.size-limit.json |
Updates size limits to accommodate new code |
.github/workflows/ci.yaml |
Re-enables release workflow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| export const isV4Format: Checker = (addr: string): boolean=> { | ||
| return isIPv4Candidate(addr) && Address.normalizeToLong(addr, true) !== -1 | ||
| return addr.length <= IPV4_LEN_LIM && IPV4_RE.test(addr) |
There was a problem hiding this comment.
The variable IPV4_LEN_LIM is referenced but not defined in the visible context. This will cause a runtime error if the constant is not properly defined elsewhere in the file.
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.
closes #16