Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactor: use perf_counter for accurate benchmarking#2940

Merged
awni merged 2 commits intoml-explore:mainfrom
Satyam12singh:refactor/use-perf-counter
Dec 21, 2025
Merged

refactor: use perf_counter for accurate benchmarking#2940
awni merged 2 commits intoml-explore:mainfrom
Satyam12singh:refactor/use-perf-counter

Conversation

@Satyam12singh
Copy link
Contributor

Proposed changes

This PR replaces time.time() with time.perf_counter() in the logistic regression example.

Problem: time.time() is non-monotonic and susceptible to system clock adjustments, which can lead to inaccurate throughput (it/s) measurements.
Solution: time.perf_counter() provides a high-resolution, monotonic clock ideal for benchmarking.

Checklist

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

@Satyam12singh
Copy link
Contributor Author

Hi @awni , I believe this is ready to merge. Please let me know if there’s anything else to address.

@awni awni merged commit e6de81c into ml-explore:main Dec 21, 2025
14 checks 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.

2 participants