Board index » delphi » Fastcode IntToStr B&V version 0.31

Fastcode IntToStr B&V version 0.31


2005-10-03 02:01:49 AM
delphi82
Released on attachments.
This includes the fixed JOH functions.
 
 

Re:Fastcode IntToStr B&V version 0.31

Released
www.fastcode.dk/fastcodeproject/fastcodeproject/61.htm
I still see FastMM4.
I still see 3 different benchmarks for IntToStr32.
I still see two challenges in one B&V.
Best regards
Dennis
 

Re:Fastcode IntToStr B&V version 0.31

Quote
www.fastcode.dk/fastcodeproject/fastcodeproject/61.htm

I still see FastMM4.
Note that this isn't the final release yet. I will release FastMM4
there.
Quote
I still see 3 different benchmarks for IntToStr32.
I don't think this vote has been closed yet, so i wouldn't know which
ones to remove and which one to keep.
Quote
I still see two challenges in one B&V.
IMO these challenges are related in the same way as the floating point
functions which have different accuracies: they have the same name and
most algorithms are portable between the two subchallenges. Therefore i
think these belong together in the same B&V.
 

Re:Fastcode IntToStr B&V version 0.31

Hi Avatar
Quote
Note that this isn't the final release yet. I will release FastMM4
there.
There is no reason not to remove it now.
Quote
>I still see 3 different benchmarks for IntToStr32.

I don't think this vote has been closed yet, so i wouldn't know which
ones to remove and which one to keep.
I have seen no response to the 36 benchmark all x10 runs I have published.
It is very easy to pick the best benchmark based on these results. No voting
needed.
Quote
>I still see two challenges in one B&V.

IMO these challenges are related in the same way as the floating point
functions which have different accuracies: they have the same name and
most algorithms are portable between the two subchallenges. Therefore i
think these belong together in the same B&V.
You ignored all my arguments in a thread I dedicated to this issue.
There are so many details to take care of in a challenge :-)
Regards
Dennis
 

Re:Fastcode IntToStr B&V version 0.31

"Dennis" <XXXX@XXXXX.COM>writes
Quote
Hi Avatar

>IMO these challenges are related in the same way as the floating point
>functions which have different accuracies: they have the same name and
>most algorithms are portable between the two subchallenges. Therefore i
>think these belong together in the same B&V.

You ignored all my arguments in a thread I dedicated to this issue.

I too believe that IntToStr and IntToStr64 are so closely related that it is
more logical to just maintain just one B&V (the RTL only contains one
IntToStr function).
I would prefer simlar functions to be grouped into a single B&V wherever
practical (ie Pos, PosEx and PosIEx) since these functions will often be
very similar or even use each other.
eg. My preferred (and very small) Pos replacement function is:-
function PosJOH_IA32_X(const SubStr : AnsiString; const Str : AnsiString) :
Integer;
asm
mov ecx, 1
jmp PosEx_JOH_IA32_X;
end;
where PosEx_JOH_IA32_X is my fastest PosEx function.
This function may be 1-2% slower than the fastest possible Pos replacement ,
but is real-world use the saving in cache usage make the speed difference
insignificant.
regards,
John
 

Re:Fastcode IntToStr B&V version 0.31

Hi John and Avatar
Then you suggest that we rework all previous B&V's and challenges and the
point system?
Best regards
Dennis
 

Re:Fastcode IntToStr B&V version 0.31

Hi John
Quote
eg. My preferred (and very small) Pos replacement function is:-

function PosJOH_IA32_X(const SubStr : AnsiString; const Str : AnsiString)
:
Integer;
asm
mov ecx, 1
jmp PosEx_JOH_IA32_X;
end;
Then post that function for the Pos challenge and take the x% performance
hit with a smile.
Regards
Dennis
 

Re:Fastcode IntToStr B&V version 0.31

Hi
Quote
I too believe that IntToStr and IntToStr64 are so closely related that it
is
more logical to just maintain just one B&V (the RTL only contains one
IntToStr function).
Should we have one IntToStr3264 challenge or two challenges called
IntToStr32 and IntToStr64?
Should we have one B&V per challenge?
Quote
I would prefer simlar functions to be grouped into a single B&V wherever
practical (ie Pos, PosEx and PosIEx) since these functions will often be
very similar or even use each other.
IMHO: This a very different suggestion.
Regards
Dennis
 

Re:Fastcode IntToStr B&V version 0.31

Hi John
Post like this makes me feel bad ;-)
It is like you throw a bomb into the middle of the entire project setup.
It is like I should spend my time reworking the concept every two days. I
can think of something more fun and productive.
We have always had the three overloaded floating point functions collected
in one challenge.
We have always had Int and Int64 functions separated into each own
challenge.
We have never had combined challenges for CharPos and CharPosEx etc.
If this should change and we also want consistency then you ask me to rework
around 50 challenges and B&V's. This is the last 3 years work. I can see the
argument for keeping IntToStr32 and IntToStr64 in the same challenge, but it
will introduce inconsitency into our project.
Your last suggestion will seriously mess everything up. I think that you
conclude that we should change the entire Fastcode setup just because you
want to reuse PosEx in your own library.
If I should answer politely to all suggestions like this everyday then there
will be no new challenges or libraries.
I think that we all had a decent communication about these issues in the
last status thread. Should we repeat that again?
Best regards
Dennis
 

Re:Fastcode IntToStr B&V version 0.31

Quote
Then you suggest that we rework all previous B&V's and challenges and
the point system?
IMO neither the previous challenges nor the point system need any
changes. Points can simply be awarded per sub-challenge.
 

Re:Fastcode IntToStr B&V version 0.31

Quote
>I too believe that IntToStr and IntToStr64 are so closely related
>that it
is
>more logical to just maintain just one B&V (the RTL only contains
>one IntToStr function).

Should we have one IntToStr3264 challenge or two challenges called
IntToStr32 and IntToStr64?

Should we have one B&V per challenge?
The way i see it we have one challenge called IntToStr with has a
single B&V program. This challenge has two sub-challenges: IntToStr32
and IntToStr64. This is the current situation (except that the first
sub-challenge should be renamed to IntToStr32 which more clearly marks
it as a subchallenge of IntToStr).
 

Re:Fastcode IntToStr B&V version 0.31

Hi
What about consistency with previous challenges such as MaxInt versus
MaxInt64? Should we throw that away?
Why is it a problem to have two challenges?
Tell me how you want to give points.
Best regards
Dennis
 

Re:Fastcode IntToStr B&V version 0.31

"Dennis" <XXXX@XXXXX.COM>writes
Quote

Post like this makes me feel bad ;-)

We have always had Int and Int64 functions separated into each own
challenge.

We have never had combined challenges for CharPos and CharPosEx etc.

If this should change and we also want consistency then you ask me to
rework
around 50 challenges and B&V's. This is the last 3 years work. I can see
the
argument for keeping IntToStr32 and IntToStr64 in the same challenge, but
it
will introduce inconsitency into our project.
Don't get me wrong. I am not proposing that we change any of the currently
open or already closed challenges. I am just making proposals for what I
would like to see in future challenges (2006 challenges?).
Quote
Your last suggestion will seriously mess everything up. I think that you
conclude that we should change the entire Fastcode setup just because you
want to reuse PosEx in your own library.
Not at all. There will always some trade-off between code size and speed.
If I have to choose between a 300 byte function and 10 byte function which
is 1% slower, I'd choose the smaller version. I know you disagree with
this.
We now have many very fast functions but do not even reuse them ourselves
(because the Fastcode rules do not apply size limitations or penalties for
Non-RTL function). This effectively prevent us from reusing them within
other Fastcode functions. (Pos can use PosEx, CharPos can use CharPosEx,
IntToStr64 can use IntToStr etc).
If I create a 10-Byte Pos function which simply uses the current system
PosEx it would be slow but only count as 10 bytes in size. If I instead use
my own faster PosEx function with it, it would be fast but count as approx.
200 bytes in size. This couldy make a winning function into a losing one.
When Borland release Dexter with a faster PosEx, the 10-Byte function could
then become a winner again (but only on Dexter).
I therefore propose that using existing Fastcode RTL replacement functions
should not be counted as part of the code size of any function, and that all
functions (not just RTL candidates) should have some degree of
size-weighting.
regards,
John
 

Re:Fastcode IntToStr B&V version 0.31

Hi John
Quote
Not at all. There will always some trade-off between code size and speed.
If I have to choose between a 300 byte function and 10 byte function which
is 1% slower, I'd choose the smaller version. I know you disagree
with
this.
I do not.
Regards
Dennis
 

Re:Fastcode IntToStr B&V version 0.31

Hi John
Quote
Don't get me wrong. I am not proposing that we change any of the
currently
open or already closed challenges. I am just making proposals for what I
would like to see in future challenges (2006 challenges?).
OK. Then we will work out the details then.
Quote
>Your last suggestion will seriously mess everything up. I think that you
>conclude that we should change the entire Fastcode setup just because
you
>want to reuse PosEx in your own library.

Not at all. There will always some trade-off between code size and speed.
If I have to choose between a 300 byte function and 10 byte function which
is 1% slower, I'd choose the smaller version. I know you disagree
with
this.

We now have many very fast functions but do not even reuse them ourselves
(because the Fastcode rules do not apply size limitations or penalties for
Non-RTL function). This effectively prevent us from reusing them within
other Fastcode functions. (Pos can use PosEx, CharPos can use CharPosEx,
IntToStr64 can use IntToStr etc).

If I create a 10-Byte Pos function which simply uses the current system
PosEx it would be slow but only count as 10 bytes in size. If I instead
use
my own faster PosEx function with it, it would be fast but count as
approx.
200 bytes in size. This couldy make a winning function into a losing one.
When Borland release Dexter with a faster PosEx, the 10-Byte function
could
then become a winner again (but only on Dexter).

I therefore propose that using existing Fastcode RTL replacement functions
should not be counted as part of the code size of any function, and that
all
functions (not just RTL candidates) should have some degree of
size-weighting.
OK those details makes things easier to understand.
Regards
Dennis