Skip to content

Conversation

@forfudan
Copy link
Owner

This pull request includes the log and log10 functions in the decimojo library.
It also introduces a new benchmark for the log10 function and includes several updates to the Decimal struct in the decimojo library.

Library Updates:

  • Included log and log10 in the decimojo library's __init__.mojo file to make them available for import.

New Benchmark for log10 Function:

  • Added a comprehensive benchmark for the log10 function in benches/bench_log10.mojo to compare performance against Python's decimal module with diverse test cases.

Project Configuration Updates:

  • Updated benches/bench.mojo to include bench_log10 in the list of benchmarks.
  • Updated mojoproject.toml to include test_log and test_log10 in the test configurations and bench_log10 in the benchmark configurations.

Decimal Struct Enhancements:

  • Added @always_inline decorator to several static methods and instance methods in struct Decimal to improve performance.

@forfudan forfudan merged commit 0d6e808 into main Mar 19, 2025
1 check passed
@forfudan forfudan deleted the log branch March 19, 2025 20:38
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