How Mojo gets a speedup over Python – Part 2
modular.com
How Mojo gets a speedup over Python – Part 2
1–10 of 66 posts
Re: How Mojo gets a speedup over Python – Part 2
#2> The above code produced a 90x speedup over Python and a 15x speedup over NumPy as shown in the figure below:
Am I missing something?
Re: How Mojo gets a speedup over Python – Part 2
#3So TL;DR: Using SIMD and multithreading is faster than doing no optimization in python. The only real comparison here is when not doing any optimization is: > The above code produced a 90x speedup over Python and a 15x speedup over NumPy as shown in the figure below: Am I missing something?
I’ll take it.
This is all pretty impressive if I can take my unmodified (slightly modified?) Python code and get that sort of improvement.
Re: How Mojo gets a speedup over Python – Part 2
#4So TL;DR: Using SIMD and multithreading is faster than doing no optimization in python. The only real comparison here is when not doing any optimization is: > The above code produced a 90x speedup over Python and a 15x speedup over NumPy as shown in the figure below: Am I missing something?
Re: How Mojo gets a speedup over Python – Part 2
#5Re: How Mojo gets a speedup over Python – Part 2
#6So TL;DR: Using SIMD and multithreading is faster than doing no optimization in python. The only real comparison here is when not doing any optimization is: > The above code produced a 90x speedup over Python and a 15x speedup over NumPy as shown in the figure below: Am I missing something?
Well, isn't that most Python? If Mojo can pave over the slow interpreted bits I repeatedly dig up in Python profilers, even well maintained projects, with no code changes, that would be huge.
Re: How Mojo gets a speedup over Python – Part 2
#7Re: How Mojo gets a speedup over Python – Part 2
#8Re: How Mojo gets a speedup over Python – Part 2
#9I think I should be impressed, but I feel like I’m missing the point.
Re: How Mojo gets a speedup over Python – Part 2
#10In Java land we had a bunch of other JVMs over the years offering better performance. Most important things got absorbed into what is now OpenJDK, and the other JVMs, if they even exist at all, are niche players.
Performance is a huge focus in Python and ML lands right now, so why would this be any different?