Re: 2D Arrays?
Posted by
caffeine on
May 12, 2008; 3:49pm
URL: http://quantlib.414.s1.nabble.com/2D-Arrays-tp5941p5945.html
Luigi Ballabio wrote
On Mon, 2008-05-12 at 06:14 -0700, op wrote:
> huh? what's wrong it? it's dam slow, that's what's wrong with it.
>
> you may better off using a raw C array.
"Somewhat slow" I can see. But "damn slow" I have some difficulties to
believe. With the correct optimization flags, any compiler released in
the past few years should be able to inline most std::vector calls into
accesses to a raw C array.
Anyway, you can try Boost.MultiArray instead:
<
http://www.boost.org/doc/libs/1_35_0/libs/multi_array/doc/index.html>
Luigi
I see that I was too slow on the "it's too slow" response. :-)
Do you have any proof that a compiler will inline std::vector calls into raw C array accesses? If it were true, I would be ecstatic, but I don't believe it for a second.
I just stumbled onto boost. I'll take a look at it. Thanks!
Pete