Parallelism_level

Nice to see Mojo reach v.1.0

I’m comparing Mojo to C on a mandelbrot task.

This on a Macbook Air M5. SIMD works well, but multi-threaded performance suffers and I think it is because parallelism_level()is limited to 4. Is there a way to increase it?

The M5 has 4 performance cores and 6 efficiency cores - performance cores are faster. However, the C program is significantly faster when the number of threads is bumped up to 9 or 10. I assume the same would be the case for Mojo.

Language Repository Single Thread Multi-Thread Simd Multi-Thread + Simd
C mandelbrot-c 3.6 0.6
Mojo mandelbrot-mojo 3.8 1.2 0.7 0.4

Hi @reymono ! We’re excited about 1.0 too :partying_face:

The short answer is no, this can’t be configured right now. Here’s a message from @owenhilyard explaining the current state of threading and some of the reasons it hasn’t been added yet.