Skip to content

Conversation

@forfudan
Copy link
Owner

This pull request introduces significant updates to the README.md documentation and benchmarks for the DeciMojo library. The changes primarily focus on renaming the Decimal type to Decimal128 for clarity and consistency, updating aliases and examples accordingly, and improving benchmark scripts to reflect these changes.

Documentation Updates:

  1. Type Renaming and Aliases:

    • Renamed Decimal to Decimal128 to better reflect its 128-bit fixed-precision nature and updated its alias from Dec to Dec128.
    • Updated examples and descriptions to use the new Decimal128 name and alias in various sections, including construction, arithmetic, rounding, and mathematical functions.
  2. Precision and Usage Details:

    • Clarified the default precision for BigDecimal operations and provided examples of how to configure precision using the precision argument.
    • Updated footnotes to reflect the renaming of Decimal to Decimal128 and its characteristics.
  3. Benchmarking Instructions:

    • Updated the benchmarking command from pixi run bench_decimal to pixi run bdec and adjusted the log file path to align with the new naming convention.

Benchmark Script Updates:

  1. Type Renaming:

    • Renamed the benchmark file from benches/decimal/bench_add.mojo to benches/decimal128/bench_add.mojo.
    • Updated all references to Decimal in the benchmark script to Decimal128, including variable names, function arguments, and comments.
  2. Benchmark Cases:

    • Adjusted test cases to use Decimal128 for various scenarios, such as simple integers, high-precision decimals, and numbers requiring carrying.

These updates improve clarity in the documentation, align the naming convention with the library's goals, and ensure that benchmarks accurately reflect the latest changes.

@forfudan forfudan merged commit 431d993 into main Jul 24, 2025
1 check passed
@forfudan forfudan deleted the work branch July 24, 2025 20:10
forfudan added a commit that referenced this pull request Jul 24, 2025
forfudan added a commit that referenced this pull request Jul 26, 2025
forfudan added a commit that referenced this pull request Jul 31, 2025
forfudan added a commit that referenced this pull request Aug 3, 2025
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