Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

STL Alternative

I really hate using STL containers because they make the debug version of my code run really slowly. What do other people use instead of STL that has reasonable performance for debug builds?

I'm a game programmer and this has been a problem on many of the projects I've worked on. It's pretty hard to get 60 fps when you use STL container for everything.

I use MSVC for most of my work.

like image 750
Tod Avatar asked Sep 17 '08 20:09

Tod


People also ask

Which is better STL or 3MF?

For one, 3MF files carry way more information, including unit information, color and texture information for multijet prints, relative position in space, and so much more. STLs do not even have units! Even though they carry this much data, 3MF files are still significantly smaller than STL files.

Is STL or OBJ better?

OBJ and STL file types are the same in terms of functionality but not the same in terms of storage. STL files are the most popular 3D file types and are known for their simplicity and small size, while OBJ files are more accurate in resolution and texture.

What is the difference between STL and STP?

The STP format uses a data algorithm that presents the data in more detail than the STL format. This is due to the transformation of the surface into a kind of mesh of triangles, simplifying the representation of shape in STL format.

Which file is best for 3D printing?

For simple prints, STL files are the best 3D printing file. They are small, simple and widely supported, making them something of an industry standard. When you need to store colours and textures, the best 3D printing file is OBJ. OBJ is also more capable than STL when it comes to describing geometries.


1 Answers

EASTL is a possibility, but still not perfect. Paul Pedriana of Electronic Arts did an investigation of various STL implementations with respect to performance in game applications the summary of which is found here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html

Some of these adjustments to are being reviewed for inclusion in the C++ standard.

And note, even EASTL doesn't optimize for the non-optimized case. I had an excel file w/ some timing a while back but I think I've lost it, but for access it was something like:

       debug   release STL      100        10 EASTL     10         3 array[i]   3         1 

The most success I've had was rolling my own containers. You can get those down to near array[x] performance.

like image 184
Jeff Avatar answered Oct 14 '22 03:10

Jeff