QuantEcon / project.lecture-mojo

Some Real World Examples using Mojo (Modular)
https://quantecon.github.io/project.lecture-mojo/
3 stars 2 forks source link

Add wealth distribution mojo example #8

Closed kp992 closed 10 months ago

kp992 commented 11 months ago

5

JAX equivalent lecture: https://jax.quantecon.org/wealth_dynamics.html

Time comparisons:

JAX time (runtime): 13.1 ms
mojo time (compilation + runtime): 0.12 ms

mojo is almost 100x faster than JAX. The example will still require a bit of refinement to generate the plot within mojo file so the results are easier to compare. Currently, I have manually generated the plot from the results in a new python file and I got the following: wd1-img1

mmcky commented 11 months ago

@kp992 thanks for this. Can you please fill in the top level comment box with some comparisons and comments? Is it faster etc?

kp992 commented 11 months ago

@kp992 thanks for this. Can you please fill in the top level comment box with some comparisons and comments? Is it faster etc?

Done @mmcky. Thanks for the review.

kp992 commented 11 months ago

Shall we merge this @mmcky?

mmcky commented 10 months ago

thanks @kp992