STL, in large systems sims/high computing performance

AI Thread Summary
STL (Standard Template Library) can be utilized in large system simulations, but its effectiveness depends on the specific requirements of the project. For computational astrophysics or large neural networks, using STL may introduce overhead, though it can also speed up development by providing ready-made data structures. It's suggested to initially use STL for convenience and rapid prototyping, then optimize as needed based on performance assessments. The discussion emphasizes the importance of avoiding premature optimization and encourages leveraging STL where it makes sense, while also considering custom data structures for specific needs. The user is currently exploring vector stacks, priority queues, and lists for a particle collision simulation and aims to scale up from 1,000 to 10,000 particles.
neurocomp2003
Messages
1,359
Reaction score
4
(hehe here's another one for you dduardo :biggrin: )
Does anyone know if STL is used or is capable of being used in large system simulations? Or is it best to write your own datastructtures?
Looking to do some computational astrophysics or large neural nets and am not sure whether to use STL or not... I want to if it can be used for the large scale that I'm envisioning, but i don't now if there would be overhead that i wouldn't now about.
 
Technology news on Phys.org
You have to remember that STL is generalized. Depending on what you are doing you may be able to optimize the structures and performance of certain operations.

What type of structures do you plan on using?
 
W.A. Wulf said:
"More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason - including blind stupidity."
Hoare and Knuth said:
"Premature optimization is the root of all evil."
It would probably be best to use the STL data structures where convenient, to more quickly produce working code, and then figure out what and how to optimize.

(reference: Wikipedia)[/size]
 
Linus Torvald said:
"[...] the Linux philosophy is 'laugh in the face of danger'. Oops. Wrong one. 'Do it yourself'. That's it."

If you can reinvent the wheel, do it!

(reference: http://en.wikiquote.org/wiki/Linus_Torvalds" )

j/k :-p
 
Last edited by a moderator:
vector stack, PQueue and list. are the ones I'm looking at. I'm just running a simple particle collision(n=1000) looking to go to n=10000 if i can find a system better than mind. Trying to land a research job. =]
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top