It took around 20 years for CPU manufacturers to abandon the GHz war on the desktop and start going multicore.

In the mobile space and only 3 years after the first Android smartphone, we are already seeing dual-cores phones (with quad-cores around the corner). Recent tablets are on the same boat.

The brilliant thing is that with MonoDroid and MonoTouch, we have the possibility to harness this new found processing power today using all the existing ParallelFx constructs since they are part of both distributions (i.e. Tasks, continuations, parallel loops, PLinq and friends).

To illustrate that, I ported the now classic raytracer code from the Parallel sample gallery to Android using Monodroid. Code is on GitHub if you want to give it a spin.

While the application itself is painfully slow since all rendering is in software, it does exhibit the same speed improvement when you ran in parallel mode as with the desktop version on my dual-core smartphone. For iDevices lovers, Geoff also had a similar version running on an iPad 2.

If you are at Monospace and want to talk about that stuff (and ParallelFx in general), don’t hesitate to come and say hi. Anyhow, I’ll continue to post more examples of how you can use ParallelFx practically in your mobile apps.

PS: as you’ll see in the source, there are some hacks bundled because of a couple of Mono bugs but they will get fixed eventually.