Skip to content

adds performance improvements#2

Merged
kgwinnup merged 1 commit intomainfrom
performance-optimizations-1
Jun 6, 2025
Merged

adds performance improvements#2
kgwinnup merged 1 commit intomainfrom
performance-optimizations-1

Conversation

@kgwinnup
Copy link
Owner

@kgwinnup kgwinnup commented Jun 6, 2025

This PR makes three performance related changes:

  1. instead of using the standard parseInt to parse the string TLSH hash into a byte array, a custom string to base 16 function is implemented.
  2. When splitting a leaf, the loop now properly exits when the TLSH distance (splitPoint) grows greater than 255
  3. Minor tweak to the incrementing of the splitPoint, and starting split. (empirically these values are decent, but may be specific to a use case, may want to consider these as a parameter in the future).

@kgwinnup kgwinnup merged commit 775e7d9 into main Jun 6, 2025
1 check passed
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.

1 participant