Skip to content

Commit 61f25af

Browse files
authored
[repo][docs] Reorganize the repo + update the readme file (#46)
This pull request includes significant updates to the `README.md` file and several changes to benchmark files, mainly focusing on improving documentation and code organization. ### Documentation Enhancements: - **README.md**: Expanded the overview and added detailed descriptions of the `Decimal` type and future roadmap items. Enhanced the installation instructions and added a comprehensive quick-start guide. - **Status Section**: Updated the status of the project phases, detailing the completion of the "Make it Work" phase, progress in the "Make it Right" phase, and significant advancements in the "Make it Fast" phase. Added a new "Future Extensions" section. - **Footnotes**: Added footnotes to explain the fixed precision and arbitrary precision types, providing context and comparisons to similar implementations in other languages. ### Codebase organization: - **Dedicated folder for Decimal type**: Added a dedicated `decimal` sub-package for the `Decimal` type. Also added dedicated folders for the tests and benches.
1 parent 96b5a01 commit 61f25af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+445
-406
lines changed

.github/workflows/run_tests.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,9 @@ jobs:
5555
cp decimojo.mojopkg tests/
5656
cp decimojo.mojopkg benches/
5757
58-
- name: Run tests and benches
58+
- name: Run tests
5959
run: |
6060
magic run mojo test tests
61-
magic run bench
6261
6362
- name: Install pre-commit
6463
run: |

README.md

Lines changed: 123 additions & 203 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fn run_benchmark(
7373
var py_decimal = pydecimal.Decimal(input_value)
7474

7575
# Execute the operations once to verify correctness
76-
var mojo_result = dm.exponential.exp(mojo_decimal)
76+
var mojo_result = mojo_decimal.exp()
7777
var py_result = py_decimal.exp()
7878

7979
# Display results for verification
@@ -83,7 +83,7 @@ fn run_benchmark(
8383
# Benchmark Mojo implementation
8484
var t0 = perf_counter_ns()
8585
for _ in range(iterations):
86-
_ = dm.exponential.exp(mojo_decimal)
86+
_ = mojo_decimal.exp()
8787
var mojo_time = (perf_counter_ns() - t0) / iterations
8888
if mojo_time == 0:
8989
mojo_time = 1 # Prevent division by zero

0 commit comments

Comments
 (0)