microsoft / security-utilities

Security utilities for key generation, string redaction, etc.
MIT License
25 stars 11 forks source link

Optimize secret masking, c3id genertion, `marvin`, and checksum validation. #67

Closed jdraaijer-microsoft closed 3 months ago

jdraaijer-microsoft commented 3 months ago

This PR improves the secret_masker_test with checksum benchmark by about 32%, from 1300 ns to 880 ns per iteration, and the without checksum by about 15% from 879ns to 734 ns per iteration, on my machine.

It applies the following changes:

This may be (far too) much for a single PR, but I have tried my best to split the changes into concise commits and am willing to make separate PRs for them if that is preferred.

jdraaijer-microsoft commented 3 months ago

I've updated the commit messages to be more descriptive, and make it obvious which commits touch which parts.

suvamM commented 3 months ago

@jdraaijer-microsoft This PR has some good changes. But reviewing this is hard for me. Could you please scope the changes into smaller PRs?

jdraaijer-microsoft commented 3 months ago

Closing in favor of smaller (future) PRs: #69, #70