Skip to content

Conversation

@ppkarwasz
Copy link
Contributor

This adds a small benchmark for percent encoding/decoding algorithms. You can run it with:

mvn -Pbenchmark

To pass arguments to JMH use -Djmh.args="<arguments>".

This adds a small benchmark for percent encoding/decoding algorithms.
You can run it with:

```
mvn -Pbenchmark
```

To pass arguments to JMH use `-Djmh.args="<arguments>"`.
@dwalluck
Copy link
Contributor

But, what do we compare it to? Another existing implementation? Commons Codec will be significantly faster since it operates on byte[] and doesn't do the String conversion, but HttpClient 4.x or 5.x should have String versions.

@jeremylong
Copy link
Collaborator

the use for this benchmark in comparing versions - if we update the encoding again.

@jeremylong jeremylong merged commit 647fbd3 into package-url:master Mar 22, 2025
3 checks passed
@ppkarwasz ppkarwasz deleted the feature/benchmark branch March 22, 2025 23:13
@ppkarwasz
Copy link
Contributor Author

the use for this benchmark in comparing versions - if we update the encoding again.

Exactly, the purpose of the benchmark is to check which modifications of the percentDecode and percentEncode methods improve the performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants