Commit 267ffc3
Complete numpy_vs_numba_vs_jax lecture with timing comparisons
Added comprehensive comparisons between NumPy, Numba, and JAX for both
vectorized and sequential operations:
- Added Numba simple loop and parallel versions for vectorized example
- Demonstrated nested prange parallelization and its limitations
- Added detailed discussion of parallelization overhead and contention issues
- Implemented sequential operation (quadratic map) in both Numba and JAX
- Used JAX lax.scan with @partial(jax.jit, static_argnums) for cleaner code
- Added timing code with separate runs to show compile vs cached performance
- Included educational discussion without specific numbers (machine-independent)
- Added explanation of reduction problem challenges with shared variable updates
- Fixed spelling error: "implict" → "implicit"
- Added missing punctuation
All code examples tested and verified to run successfully.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent c0f5f33 commit 267ffc3
2 files changed
+264
-261
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
919 | 919 | | |
920 | 920 | | |
921 | 921 | | |
922 | | - | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
923 | 925 | | |
924 | | - | |
925 | 926 | | |
926 | 927 | | |
927 | 928 | | |
| |||
1081 | 1082 | | |
1082 | 1083 | | |
1083 | 1084 | | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
1084 | 1121 | | |
1085 | 1122 | | |
1086 | 1123 | | |
| |||
0 commit comments