caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] speeding up matrix multiplication (newbie question)
Date: Fri, 20 Feb 2009 17:46:37 +0000	[thread overview]
Message-ID: <200902201746.37679.jon@ffconsultancy.com> (raw)
In-Reply-To: <243054520902200740j1d1874adib27645f6e090b073@mail.gmail.com>

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 course important but not an
> incredibly crucial issue, as the most important thing is relative
> comparison between things which *should* be pretty different. Currently I'm
> just using native
> (double-precision) ocaml floats and the native ocaml arrays for a first
> pass on the problem.
>
> Now I'm thinking about moving to using float32 bigarrays, and I'm hoping
> that the code will double in speed. I'd like to know: is that realistic?
> Any other suggestions?

What exactly are you doing? Exactly how big are the matrices? What is your 
exact code? What is the higher-level algorithm using the matrix multiply? Are 
you doing a loop just over many matrix multiplies? What platform and 
architecture are you using? Is the code parallelized?

Depending upon the answers to the above questions, you may be able to achieve 
huge performance improvements using tools like LLVM to generate SSE code 
whilst still acting upon OCaml's data structures.

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e


  parent reply	other threads:[~2009-02-20 17:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 15:40 Erick Matsen
2009-02-20 15:45 ` [Caml-list] " RABIH.ELCHAAR
2009-02-20 17:46 ` Jon Harrop [this message]
2009-02-20 18:46 ` Xavier Leroy
2009-02-20 19:53   ` Erick Matsen
2009-02-20 21:21     ` Will M. Farr
2009-02-20 21:37     ` Martin Jambon
2009-02-20 22:23     ` Mike Lin
2009-02-20 22:30       ` Will M. Farr
2009-02-20 22:43         ` Markus Mottl
2009-02-23 22:59           ` Erick Matsen
2009-02-20 22:43         ` Mike Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200902201746.37679.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).