Disappointing math performance compared to GDC

Gabor Mezo via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Thu Oct 9 00:57:02 PDT 2014


Let me introduce my project for you guys.

There is the blog:

http://neuroflowblog.wordpress.com/

I started to work on it almost 10 years ago. It was a C# project, 
and the productivity of the language allowed me to implement 
advanced machine learning algorithms like Realtime Recurrent 
Learning and Scaled Conjugate Gradient. Sadly the performance was 
not that good, so I learned OpenCL. I implemented a provider 
model in my framework, so I became able to use managed and OpenCL 
implementations in the same system. Because my experimental code 
was implemented in C# and because managed code was slow, my 
experiments went really slow.

Then I decided to move my experimental layer to C++11, and my 
framework became pure native. Sadly productivity of C++ is poor 
compared to C#, so even my experimental code was fast, my 
experiments became slower than was by using the managed version.

The I decided to learn D, and the result is on the Github (a DUB 
project):

https://github.com/unbornchikken/neuroflow-D

This is a console application, the mentioned benchmark will start.

Please note, this is my first time D code. There are constructs 
those seems lead to nowhere, but they will gain purpose when I 
port all of the planned functionality. Because there are a 
provider model to have OpenCL and D (and whatever) based 
implementations in parallel, I wasn't able to avoid downcasting 
in my design. Because downcasting can hugely affect performance I 
implemented some ugly but performant void * magic. Sorry for 
that. :) Conversion of the OpenCL implementation to D is still 
TODO. Recurrent learning implementations are not implemented 
right now.


More information about the digitalmars-d-ldc mailing list