Helpful Information
 
 
Category: Software Design
Online-sites about algorithms and optimization?

Hi ppl!

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...
TIA,
... M.

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:
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)...
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 :)
-b

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.

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?)

This would be a good place to start:
http://www.cs.brown.edu/people/jak/proglang/cpp/stltut/tut.html
http://www.yrl.co.uk/~phil/stl/stl.htmlx
http://www.xraylith.wisc.edu/~khan/software/stl/STL.newbie.html

The third link is outdated, but it has links to various STL implementations at the bottom. Also, the third link contains a link to a lot of examples.

There are several STL implementations -- you can get some of them from the third link and another one is http://www.stlport.org/

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


>Today's implementations of STL are indeed not optimal. But the logic
>behind using them is their wide-spread use will ensure that they're
>well tested and bug-free.


Which, just for reference of where the quote came from, not necessarily relevance to the topic at hand is at:

http://groups.google.com/groups?q=different+implementations+of+STL&start=10&hl=en&lr=&ie=UTF-8&oe=UTF-8&scoring=d&selm=3e2de4de%241%40newsgroups.borland.com&rnum=19

-b










privacy (GDPR)