writing more effective code

Started by
10 comments, last by JasonBlochowiak 17 years, 10 months ago
Quote:Original post by clearly
nooo you got it all wrong..
i wanted to build a function that will show where the string starts at.. in another string..
i only asked if theres a way to make if more effective..


Well, my remark about Knuth-Morris-Pratt, Rabin-Karp and Ukkonen still stands. As someone who is very smart has said:

Quote:Original post by someone who is very smart
Remember: using a fast algorithm is always more effective than using a slow algorithm. No matter how much you optimize your slow code, it will still be slow!

Advertisement
Quote:Original post by ToohrVyk
Quote:Original post by clearly
nooo you got it all wrong..
i wanted to build a function that will show where the string starts at.. in another string..
i only asked if theres a way to make if more effective..


Well, my remark about Knuth-Morris-Pratt, Rabin-Karp and Ukkonen still stands. As someone who is very smart has said:

Quote:Original post by someone who is very smart
Remember: using a fast algorithm is always more effective than using a slow algorithm. No matter how much you optimize your slow code, it will still be slow!


My favorite: Remember that the fastest code is that which is not executed.

Not directly relevant to your (excellent) point about search algorithms, but worth noting, nonetheless.

This topic is closed to new replies.

Advertisement