Board index » delphi » Re: Fastcode versus Highlander

Re: Fastcode versus Highlander


2006-07-06 10:32:30 AM
delphi58
Dennis writes:
Quote
PosEx has been replaced and the AnsiStringReplace QC report is open,
so I think that somebody has been convinced ;-)
I wouldn't confuse Open as meaning "will be done".
--
Compact Framework for Delphi 2006: www.jed-software.com/cf.htm
QualityCentral Windows Client: www.jed-software.com/qc.htm
Visual Forms IDE Add In: www.jed-software.com/vf.htm
 
 

Re: Fastcode versus Highlander

Hi
Quote
I wouldn't confuse Open as meaning "will be done".
Nope, but it actually happens that open reports are taken seriously and
resolved. I know for sure that the AnsiStringReplace report is considered.
Only a minor issue kept it away for being done in DeXter.
Best regards
Dennis Kjaer Christensen
 

Re: Fastcode versus Highlander

It must be easier to convince people in Borland these days.
When I first wrote FastReplace I talked to the guy at Borland who was
responsible for maintaining routines such as StringReplace (whoever that
was).
After saying no to FastReplace I offered a slighty modified version of
StringReplace, one that didn't keep reallocating the result. Even that
simple change was many times faster than StringReplace and it didn't use any
ASM or anything. Still it was turned down. It was explained to me that he
didn't want to speed it up "In case somebody out there depends on how slow
it is", and it is only a "fluff routine" anyway. He also went on to explain
how people don't really replace text in large strings anyway. If this was
the case then why not limit strings to 255 chars again eh? :-) He also
wasn't aware of the gaining popularity of large text files such as HTML and
XML at the time.
The worst argument I have ever heard I think :-)
--
Pete
====
Audio compression components, DIB graphics controls, ECO extensions,
FastStrings
www.droopyeyes.com
My blog
blogs.slcdug.org/petermorris/
 

Re: Fastcode versus Highlander

Hi Peter
All this sounds awfull ;-(
Fastcode has been quite succesfull in getting functions into the RTL.
Something must have changed to the better - thankfully.
Best regards
Dennis Kjaer Christensen
 

Re: Fastcode versus Highlander

Hi all,
Quote

It is time to vote.

Open reports

Fastcode PosIEx in the RTL
qc.borland.com/wc/qcmain.aspx

Fastcode CompareStr in the RTL
qc.borland.com/wc/qcmain.aspx

Fastcode StrLen in the RTL
qc.borland.com/wc/qcmain.aspx

Fastcode Floor in the RTL
qc.borland.com/wc/qcmain.aspx

Fastcode Ceil in the RTL
qc.borland.com/wc/qcmain.aspx

Fastcode GCD32 in the RTL
qc.borland.com/wc/qcmain.aspx

Fastcode RoundToEx in the RTL
qc.borland.com/wc/qcmain.aspx

Fastcode AnsiStringReplace in the RTL
qc.borland.com/wc/qcmain.aspx

Fastcode CharPos in the RTL
qc.borland.com/wc/qcmain.aspx

Not opened

Fastcode RGBAtoBGRA in the RTL
qc.borland.com/wc/qcmain.aspx

Fastcode IsPrime in the RTL
qc.borland.com/wc/qcmain.aspx

Fastcode CharPosEY in the RTL
qc.borland.com/wc/qcmain.aspx

There's a change in QC, everyone has now 10 votes instead of old 5. Time
to vote.
Regards,
Jouni
--
The Fastcode Project: www.fastcodeproject.org/
 

Re: Fastcode versus Highlander

Dennis,
| It is time to vote.
Where can I find the current FastCode D/L's these days? The
SourceForge page says nothing is [yet] available? And the FastCode
page I have in my Favorites now points to SourceForge. <g>
--
Q
08/09/2006 10:11:40
XanaNews Version 1.17.5.7 [Q's salutation mod]
 

Re: Fastcode versus Highlander

Hi Community
Is our current list of QC reports for function proposals for Highlander
complete and correct?
Fastcode RGBAtoBGRA in the RTL
qc.borland.com/wc/qcmain.aspx
Fastcode PosIEx in the RTL
qc.borland.com/wc/qcmain.aspx
Fastcode CompareStr in the RTL
qc.borland.com/wc/qcmain.aspx
Fastcode StrLen in the RTL
qc.borland.com/wc/qcmain.aspx
Fastcode Floor in the RTL
qc.borland.com/wc/qcmain.aspx
Fastcode Ceil in the RTL
qc.borland.com/wc/qcmain.aspx
Fastcode GCD32 in the RTL
qc.borland.com/wc/qcmain.aspx
Fastcode IsPrime in the RTL
qc.borland.com/wc/qcmain.aspx
Fastcode RoundToEx in the RTL
qc.borland.com/wc/qcmain.aspx
Fastcode CharPosEY in the RTL
qc.borland.com/wc/qcmain.aspx
Fastcode AnsiStringReplace in the RTL
qc.borland.com/wc/qcmain.aspx
Fastcode CharPos in the RTL
qc.borland.com/wc/qcmain.aspx
Best regards
Dennis Kjaer Christensen
 

Re: Fastcode versus Highlander

Hi
What about StrIComp and Int64Mul?
Best regards
Dennis Kjaer Christensen
 

Re: Fastcode versus Highlander

Hi
Fastcode StrIComp in the RTL
qc.borland.com/wc/qcmain.aspx
Best regards
Dennis Kjaer Christensen
 

Re: Fastcode versus Highlander

64 bit integer multiplication is a "compiler magic" function (__llmul in
system.pas) so our challenge functions cannot directly replace the RTL
version. The same is true of all 64 bit math functions in system.pas
I have already raised QC's for all 11 of the 64 bit math functions in
system.pas (QC #33048 .. #33058) to get faster and bug-free versions into
the RTL.
--
regards,
John
The Fastcode Project:
www.fastcodeproject.org/
"Dennis" <XXXX@XXXXX.COM>writes
Quote
Hi

What about StrIComp and Int64Mul?

Best regards
Dennis Kjaer Christensen


 

Re: Fastcode versus Highlander

Hi John
Quote
64 bit integer multiplication is a "compiler magic" function (__llmul in
system.pas) so our challenge functions cannot directly replace the RTL
version. The same is true of all 64 bit math functions in system.pas
We should handle this as we handled Int64Div. Convert the winner function to
the __llmul compiler magic function.
QC title could be = "Int64Mul Fastcode in the RTL as __llmul".
Quote
I have already raised QC's for all 11 of the 64 bit math functions in
system.pas (QC #33048 .. #33058) to get faster and bug-free versions into
the RTL.
I cannot access these reports.
Does your QC report for __llmul mention the Fastcode Int64Mul winner?
Best regards
Dennis Kjaer Christensen
 

Re: Fastcode versus Highlander

Quote

>I have already raised QC's for all 11 of the 64 bit math functions in
>system.pas (QC #33048 .. #33058) to get faster and bug-free versions into
>the RTL.

I cannot access these reports.
My mistake. It should be QC #34048 .. #34058
regards
John
 

Re: Fastcode versus Highlander

Hi John
I have a problem with
Improved 64 bit multiply __llmul
qc.borland.com/wc/qcmain.aspx
because you bypass Fastcode. You should propose the Int64Mul challenge
winner with the Fastcode MPL license text. It migth be the exact same code,
but you have ignored the Fastcode validation, benchmarking and license. You
have actually voluntered to be the contact between Fastcode and Borland.
Is the proposed function
procedure __llmul;
asm
mov ecx, [esp+8]
imul edx, [esp+4]
imul ecx, eax
add ecx, edx
mul dword ptr [esp+4]
add edx, ecx
ret 8
end;
equal to the Int64Mul_JOH_IA32_2 function just converted to fit the __llmul
interface?
function Int64Mul_JOH_IA32_2(var X, Y : Int64) : Int64;
asm {36 Bytes}
push ebx
push edi
lea ebx, [eax] //@X
lea edi, [edx] //@Y
mov edx, [ebx+4] //X-Hi
mov ecx, [edi+4] //Y-Hi
or edx, ecx //Both 0?
mov eax, [ebx] //X-Lo
jz @@LowMul
mov edx, [edi] //Y-Lo
imul ecx, eax //Y-Hi * X-Lo
imul edx, [ebx+4] //Y-Lo * X-Hi
add ecx, edx
@@LowMul:
mul dword ptr [edi]
add edx, ecx
pop edi
pop ebx
end;
It does not look like it.
Int64Mul_JOH_IA32_2 is the winner of the IA32 size penalty target.
Best regards
Dennis Kjaer Christensen
(* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The implementation of function __lldiv is subject to the
* Mozilla Public License Version 1.1 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Portions created by the Initial Developer are Copyright (C) 2002-2004
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): John O'Harrow
*
* ***** END LICENSE BLOCK ***** *)
// -------------------------------------------------------------------------
---
// 64-bit signed multiply
// -------------------------------------------------------------------------
---
// Param 1(EDX:EAX), Param 2([ESP+8]:[ESP+4])
procedure __llmul;
asm
mov ecx, [esp+8]
imul edx, [esp+4]
imul ecx, eax
add ecx, edx
mul dword ptr [esp+4]
add edx, ecx
ret 8
end;
 

Re: Fastcode versus Highlander

The __llmul function I proposed was not a modified fastcode challenge
function, as is also the case with the other 10 new Int-64 function
replacements I proposed at the same time (this is the reason for there being
no mention of fastcode in the license block).
I have now converted this function (listed below) so that it can be tested
using the B&V. If Int64MulJOH_2 is better I can always amend the QC entry.
function Int64MulJOH_4(var X, Y: Int64): Int64;
asm {27 Bytes}
push ebx
lea ecx, [eax]
lea ebx, [edx]
mov eax, [ecx]
mov edx, [ecx+4]
mov ecx, [ebx+4]
imul edx, [ebx]
imul ecx, eax
add ecx, edx
mul [ebx]
add edx, ecx
pop ebx
end;
--
regards,
John
The Fastcode Project:
www.fastcodeproject.org/
 

Re: Fastcode versus Highlander

Hi John
Quote
The __llmul function I proposed was not a modified fastcode challenge
It should have been.
Quote
function, as is also the case with the other 10 new Int-64 function
It is ok because we have not had any challenges based upon them.
Quote
replacements I proposed at the same time (this is the reason for there
being
no mention of fastcode in the license block).
Why did you chose to bypass Fastcode?
Quote
I have now converted this function (listed below) so that it can be tested
using the B&V.
Very good. IMO - This should have been done before creating the QC report.
Quote
If Int64MulJOH_2 is better I can always amend the QC entry.
Yes.
Best regards
Dennis Kjaer Christensen