Fast Vector Class
I took the time to write my own vector class. After making a small demo that used it, the demo ran like someone had shot it in the foot. After profiling the code, I find that it's my vector class that's limping along.
I found a few classes in teh articles section, now I'm wondering if anyone has their own vector classes they'd be willing to share that they know are fast.
I haven't used it myself, but the MTL is said to be uber fast.
Programmer's Reference
Performance Tests
Open source, too.
Programmer's Reference
Performance Tests
Open source, too.
I have never had the need to implement my own vector class, but perhaps if you post some more details about your own implementation and profiling results, I can help you optimize it.
First I guess, what operations are giving you trouble, and how do you use the vector? That is, are you seeing something like deletion taking up most of the clock cycles, or resizing, or (insert operation here)?
Second, how are you implementing your vector? Is it backed by a plain array? How do you handle resizing, deleting, and the other non-trivial operations?
First I guess, what operations are giving you trouble, and how do you use the vector? That is, are you seeing something like deletion taking up most of the clock cycles, or resizing, or (insert operation here)?
Second, how are you implementing your vector? Is it backed by a plain array? How do you handle resizing, deleting, and the other non-trivial operations?
The MTL that stylin posted sounds pretty interesting. You can use a matrix to control the implementation of vectors. The vector class I wrote up is currently being used in the SDL.NET project. The vector class itself can be found here in C#. Enjoy!
Quote:Original post by Rob Loach
The MTL that stylin posted sounds pretty interesting. You can use a matrix to control the implementation of vectors.
They also have an Iterative Template Library that handles solving linear systems. What's interesting is their claim of equal or surpassing performance levels with that of some Fortran implementations.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement