diff --git a/week1/README.md b/week1/README.md index 55546ccab60259ef138dc18fc8c51aa7c18c9960..73f1fc4f18b5afb514da8425734821f37ccc526c 100644 --- a/week1/README.md +++ b/week1/README.md @@ -2,8 +2,11 @@ This week I wanted to start with a "normal" approach that felt pythonic with a particle class and a bunch of for loops / if statements, but still using numpy arrays. Then rewrite it with everything possible vectorized in numpy and see the difference in solve times for each. -Below is a 5000 particle simulation with 2000 time steps that took 0.66 s to solve for (and incidentally much longer to write to a .mp4 file). - +Below is a 5000 particle simulation with 1000 time steps that took 0.18 s to solve for (and incidentally much longer to write to a .mp4 or .gif file). + + + +https://gitlab.cba.mit.edu/davepreiss/nmm/-/blob/a6f0474d8cdb6bec89cc871ceecbd14fa6b71472/week1/maxwells_demon_fast.py [](maxwells_demon_fast.py) @@ -16,4 +19,4 @@ gpu is good at multithreading optimized for throughput over latency might be slower on gpu for small numbers of particles -jax and numba will both \ No newline at end of file +jax and numba will both