From 558752ea110a91f466dedd88306fcb5f8abbc0e9 Mon Sep 17 00:00:00 2001 From: David Preiss <davepreiss@gmail.com> Date: Wed, 15 Feb 2023 19:09:46 +0000 Subject: [PATCH] Update week1/README.md --- week1/README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/week1/README.md b/week1/README.md index 55546cc..73f1fc4 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 -- GitLab