Re: Algorythms



> As always you need to carefully benchmark what you're doing before
> deciding that it needs to be more efficient. It's quite possible that
> the algorithm you're using is just as good or better than something
> else out there.

Maybe, but I know there are lots of algorithms for f.ex. searching through
text and stuff. I know how to do lots of things with Delphi, but it seems
it's never good enough for me (either slow or sloppy code, so much Pos() and
PosEx() that I just hate myself when I look at it a week later). So, I was
searching for something time-tested and already used, so I could compare it
to my own routines and maybe combine some things.

BTW Do you happen to know which is the best way (fast, memory efficient) to
store data: dynamic arrays, collections or TStrinList. The data I want to
store is usually numbers or text, not objects.
Also, which is the best method of comparing strings, I know IF-s are slower
than CASE, but I don't know how to use CASE with strings, I suppose
typecasting with cardinal(string) isn't the best way :lol:

Thanks

Marko


.



Relevant Pages

  • Re: [newbie] Best way to search for binary data
    ... [string searching ... ... > searching random bytes. ... algorithms are usually preferred to the Knuth-Morris-Pratt algorithm. ... void init_search(const char *string) ...
    (microsoft.public.vc.language)
  • Re: "Algorithms" in Molecular Biology?
    ... provided now includes its own refutation, continuously evading any test to ... for refuting my point is to provide a definition of Algorithm which all ... Is searching not an answer in and of itself. ...
    (sci.bio.evolution)
  • Re: Efficient way to search for overlapping circles of varying radii?
    ... radius of p1 is less than the radius of p2, ... LARGER circle, as long as that larger circle has not already been removed. ... For all we can know your existing algorithm, ... sorting and searching in datasets of more than 1 dimension. ...
    (comp.graphics.algorithms)
  • Re: Fastcode Sort benchmark design
    ... > With a slower comparison function (for example comparing strings), ... Which algorithm, you consider suitable for your needs? ... I do mostly work with numbers (singular or as a part of a record) and sorting is mostly needed with numbers... ...
    (borland.public.delphi.language.basm)
  • Re: How long would it take a computer to completely "solve" chess?
    ... >> a rook against a king, search one ply farther to rule out stalemate ... >> and stop searching that branch. ... the tree will get to the same position (with same ... A position that has a known algorithm for winning. ...
    (sci.math)