Skip to content

Conversation

@forfudan
Copy link
Owner

This pull request introduces comprehensive benchmarks for the Decimal string constructor operations in the benches/bench_from_string.mojo file and removes the decimojo.str module. The key changes are grouped into two themes: benchmarking and code cleanup.

Benchmarking:

  • Added a new file benches/bench_from_string.mojo to benchmark the performance of the Decimal string constructor against Python's decimal module across diverse test cases. This includes functions to open a log file, print messages to both console and log file, run benchmarks for different cases, and display a summary of results.

Code Cleanup:

  • Removed the import statement for decimojo.str from src/decimojo/decimal.mojo as it is no longer needed.
  • Deleted the src/decimojo/str.mojo file, which contained string manipulation functions for the Decimal type. These functions are no longer used.

@forfudan forfudan merged commit de7ab01 into main Mar 12, 2025
1 check passed
@forfudan forfudan deleted the bench branch March 12, 2025 14:28
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