Re: Ada Shootout program for K-Nucleotide (patches)



Georg Bauhaus schrieb:
Ludovic Brenta schrieb:

Apparently, passing unconstrained strings to procedure Write involves
allocations on the secondary stack which account for 20% of the entire
execution time. That's hot spot #1.

Indeed, and this particular hot spot had been cooled down twice:

Step 1 - we replaced Bounded_String with our own Bounded_String

Step 2 - we replaced this new Bounded_String with plain
constrained strings of suitable fixed length (using generics)

I should add that the current program spends much of its time
in equality comparison of fragment strings,
and then some in the hash function.
So not only are the bounded_strings gone;
Jonathan has also contributed a highly efficient hashing
function and a cute string equality function.

(As mentioned, to actually see the effects (of the current
program), String_Fragments."=" should be a renaming of Equals.
Operator subprograms seem to confuse the profiling programs,
or am I missing some setting?)
.



Relevant Pages

  • Re: Ada Shootout program for K-Nucleotide (patches)
    ... execution time. ... That's hot spot #1. ... function and a cute string equality function. ... Operator subprograms seem to confuse the profiling programs, ...
    (comp.lang.ada)
  • Re: Ada Shootout program for K-Nucleotide (patches)
    ... Ludovic Brenta wrote: ... execution time. ... constrained strings of suitable fixed length ... Operator subprograms seem to confuse the profiling programs, ...
    (comp.lang.ada)
  • Re: Faster datastructure for lookups wanted
    ... My code spends most of its execution time doing lookups from ... The keys are strings and the values ... I do not care how long the construction of the datastructure takes, ... Maybe it is worth trying symbols instead of strings? ...
    (comp.lang.ruby)
  • Re: efficiency question - nested function cals
    ... On 10,000 iterations the execution time is virtually the ... good* reason not to. ... bottleneck in your code is due to one micro-optimisation. ... Even that decision is only relevant when you know the number of strings ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Fast way to determine if a string contains a member of a list of strings
    ... Really disappointing timings for the state machine method. ... Execution time: 0.055008 seconds. ... I can terminate the search as soon as ONE of the strings is ... efficiently without using a state graph. ...
    (microsoft.public.dotnet.languages.csharp)