Hello Caml-community--
First of all, big thanks to Will Farr, Mike Lin, Martin Jambon, and Markus
Mottl.
So far, I rewrote things in a non-functional way to avoid unecessary memory
allocation, and then used the float operations directly. This resulted in a 4
fold increase in speed. Second, I
Hello Ocaml community---
I'm working on speeding up some code, and I wanted to check with
someone before implementation.
As you can see below, the code primarily spends its time multiplying relatively
small matrices. Precision is of course important but not an incredibly crucial
issue, as the
this helps
Rabih
-Message d'origine-
De : caml-list-boun...@yquem.inria.fr [mailto:caml-list-boun...@yquem.inria.fr]
De la part de Erick Matsen
Envoyé : vendredi 20 février 2009 16:40
À : caml-l...@inria.fr
Objet : [Caml-list] speeding up matrix multiplication (newbie question)
Hello Ocaml
On Friday 20 February 2009 15:40:00 Erick Matsen wrote:
Hello Ocaml community---
I'm working on speeding up some code, and I wanted to check with
someone before implementation.
As you can see below, the code primarily spends its time multiplying
relatively small matrices. Precision is of
I'm working on speeding up some code, and I wanted to check with
someone before implementation.
As you can see below, the code primarily spends its time multiplying
relatively small matrices. Precision is of course important but not
an incredibly crucial issue, as the most important thing
Wow, once again I am amazed by the vitality of this list. Thank you
for your suggestions.
Here is the context: we are interested in calculating the likelihood
of taxonomic placement of short metagenomics sequence fragments from
unknown organisms in the ocean. We start by assuming a model of
Unless you want to interface C-calls into BLAS/LAPACK directly without
bounds checking, releasing the OCaml-lock, and other fru-fru, it
seems unlikely that you will get much of an advantage using those
libraries given the small size of your matrices. E.g. Lacaml is
optimized for larger matrices
These are good points. I tend to compulsively eliminate any kind of memory
allocation from my numerical loops -- it's true the OCaml allocator is a lot
faster than malloc, but you could end up repaying a lot of that back to the
GC later!
The silly library I sent out does operate on OCaml float