Re: Recommending Approach to Performance Critical Code

2008-11-09 Thread Mark H.
On Nov 9, 11:59 am, CuppoJava <[EMAIL PROTECTED]> wrote: > You seem to know a lot about this, so I can be more specific. I'm > using a conjugate gradient method for solving (and caching) systems of > equations, so there's no need to explicitly form a matrix (therefore > object allocation isn't a p

Re: Recommending Approach to Performance Critical Code

2008-11-09 Thread CuppoJava
Thank you for your replies, I wrote the numeric code myself. It's heavily optimized for speed, and as such, it doesn't contain many explicit matrix multiplications and/ or inversions. All calculations have been expanded to minimize the instruction count. You seem to know a lot about this, so I ca

Re: Recommending Approach to Performance Critical Code

2008-11-09 Thread Mark H.
On Nov 9, 7:13 am, "Michael Beauregard" <[EMAIL PROTECTED]> wrote: > That's not true. Matrix inversion is common enough in graphics > programming. I wrote a physics engine that neglected quantum effects > and still needed to invert matrices ;-) > > http://java.sun.com/javase/technologies/desktop/j

Re: Recommending Approach to Performance Critical Code

2008-11-09 Thread Michael Beauregard
Oops, I mean to link to: http://java.sun.com/javase/technologies/desktop/java3d/forDevelopers/J3D_1_3_API/j3dapi/javax/vecmath/Matrix3f.html#invert() On Sun, Nov 9, 2008 at 8:13 AM, Michael Beauregard <[EMAIL PROTECTED]> wrote: >> btw "matrix inversion" does not mean "solving linear systems" (l

Re: Recommending Approach to Performance Critical Code

2008-11-09 Thread Michael Beauregard
> btw "matrix inversion" does not mean "solving linear systems" (like > Ax=b) -- it means "finding the explicit inverse of the matrix" (like > A^{-1}), which you probably don't need to do unless your physics > engine handles quantum mechanics ;-) > That's not true. Matrix inversion is common enou

Re: Recommending Approach to Performance Critical Code

2008-11-09 Thread Mark H.
On Nov 8, 9:36 pm, CuppoJava <[EMAIL PROTECTED]> wrote: > I'm rewriting my physics engine over from Java, which is number > heavy. > There's a lot of matrix multiplication and inversions. May I ask if you wrote the Java numerics code yourself or whether you used an existing library instead? Also

Re: Recommending Approach to Performance Critical Code

2008-11-08 Thread CuppoJava
I'm rewriting my physics engine over from Java, which is number heavy. There's a lot of matrix multiplication and inversions. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, se

Re: Recommending Approach to Performance Critical Code

2008-11-06 Thread Mark H.
On Nov 6, 7:05 pm, CuppoJava <[EMAIL PROTECTED]> wrote: > I'm doing some heavy numerical matrix crunching and would like to > write it in as elegant a way as possible without sacrificing any > speed. Can you define "matrix crunching" more precisely? mfh --~--~-~--~~~-

Recommending Approach to Performance Critical Code

2008-11-06 Thread CuppoJava
I was wondering what's the recommended approach to performance code in Clojure. I'm doing some heavy numerical matrix crunching and would like to write it in as elegant a way as possible without sacrificing any speed. Is native arrays, and unchecked-arithmetic operations the way to go? Thanks f