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



Ludovic Brenta wrote:
Georg Bauhaus wrote on comp.lang.ada:
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?)

So I gather that Olivier was profiling an old version of the program.
Correct?

--
Ludovic Brenta.

Ooops, sorry for that ...

Today I can provide profile for the last version on:
- 32 bits - Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz - gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
- 64 bits - AMD Athlon(tm) 64 Processor 3000+ - gcc version 4.3.4 (Debian 4.3.4-1)

Can it help ?

Olivier
.



Relevant Pages

  • Re: Ada Shootout program for K-Nucleotide (patches)
    ... execution time. ... and this particular hot spot had been cooled down twice: ... constrained strings of suitable fixed length ... function and a cute string equality function. ...
    (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)

Loading