February 20th, 2003, 04:50 PM
Online-sites about algorithms and optimization?
As i am getting deeper into optimizing my C code right now, i wonder:
Is there something online on the 'net similar to the book "Algorithms in C" that i´ve been told to read quite often recently? Sorry, I really don´t have any money right now... i am still waiting for january´s salary to arrive on my account Also i fear this book will only cover the basics... (anyone did read it?)
I want to say:
Does anyone have a good link to sites discussing optimizing "standard" algorithms? like fast matrices operations, fast binary trees operation, fast vector mathematics, even simple array/hash searching and such?
And still also telling me basic infos (=backgrounds) about how and *why* to implement a certain algorithm?
when i asked Dr.Google, he´d tell me >1,000,000 crappy pages. Even after hours of consulting...
I do know how to implement a linked list. I want to know how to optimize it though, if necessary, down to assembly level and for certain CPUs only (if there is no "better" solution)...
Anyone got some links for me?
Maybe i´m asking too much. Maybe my problems are too specific to be answered on a single site... Still, please share any good link related to this you´ve got in your bookmarks collection...
February 21st, 2003, 09:13 AM
Sorry don't got any links for you, but if you're talking about Algorithms in C by Robert Sedgewick, I had to use it for a CS class back in college. While it does have stuff regarding the topics you discuss (binary trees, hashing/searching/sorting, etc) I don't believe it goes into as much detail as you are asking for. As far as I can remember it won't help with stuff like:
If you're not finding good sites regarding the algorithms you seek I think your best bet is just posting questions in the forums or if you need the answers even quicker just sit in #C in IRC.
Sorry I couldn't be more help. As you've helped me a bunch in the past with my linux questions
PostgreSQL, it's what's for dinner...
February 21st, 2003, 12:59 PM
If you're interested in working in C++ rather than C, then the STL library might be the way to go. I have some decent STL links for you. They don't go much into explaining the exact algorithms involved, but they tell you what to use where Let me know if you want to use STL and I'll paste the links here.
February 24th, 2003, 12:25 PM
Thanks to both of you.
Scorpions4ever: I looked into STL earlier, seemed not too complicated. But didn´t think they would improve speed over standard linked lists (as on first glance they only seemed to define the operators for easy working with trees, lists, etc).
A link that explains which of the template functions to use best for which problem would be nice too ... makes me think ... re-designing my structures/variables layout would probably speed it up anyway LOL ... but if i have to redesign them anyway, i can just as well switch over to STL in this step too...
One questions: is there different implementations of STL? (so i could develop with one for now, and if speed becomes an issue again, switch to another one?)
February 24th, 2003, 12:41 PM
February 24th, 2003, 01:01 PM
Well, I'm at work right now so I don't have all my bookmarks, but I'll check them out when I get home to see if I have anything that might be up your alley. I know it doesn't help to recommend a book since that was the point of your original post, but if you do get some cash you might wanna invest in The C++ Programming Language by Bjarne Stroustrup (the creator of C++) which is packed with more C++ than I'll ever know and has many examples of STL within it.
In regards to your question about different implementations of STL, I do believe that there are different implementations. In fact if you're concerned about performance, this quote may intereste you
Which, just for reference of where the quote came from, not necessarily relevance to the topic at hand is at:
PostgreSQL, it's what's for dinner...