 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Dennis Guest
|
Posted: Sun Mar 18, 2007 10:17 pm Post subject: Fastcode Trim B&V 0.6.0 |
|
|
Hi
Released at Yahoo. Focus is on benchmark stability.
http://tech.groups.yahoo.com/group/fastcodeproject/files/Trim/Version%200.6.
0/
Davy: I removed your failing function. Remember to give the fixed version a
new name, and it will be included in the next release.
A template function size file is included. It contains only sizes for JOH
functions. It would be nice if we all documented the function size in the
source as John do.
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Sun Mar 18, 2007 10:23 pm Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi
Here are some results from the benchmark precision optimizer
We see that these settings provide good enough stability and reasonable run
times
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 6 Thread priority:
THREAD_PRIORITY_HIGHEST Precision: 0.4 #Functions: 69
AvgBenchRuntimePerFunction: 10
Release 0.6.1 will use these settings.
Could you please run "bench test" on your PC's and check that precisions is
better than 1%.
Best regards
Dennis Kjaer Christensen
Yonah
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 5 Thread priority:
THREAD_PRIORITY_NORMAL Precision: 3.7 #Functions: 69
AvgBenchRuntimePerFunction: 8
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 5 Thread priority:
THREAD_PRIORITY_ABOVE_NORMAL Precision: 1.0 #Functions: 69
AvgBenchRuntimePerFunction: 8
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 5 Thread priority:
THREAD_PRIORITY_HIGHEST Precision: 1.0 #Functions: 69
AvgBenchRuntimePerFunction: 8
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 6 Thread priority:
THREAD_PRIORITY_NORMAL Precision: 1.0 #Functions: 69
AvgBenchRuntimePerFunction: 10
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 6 Thread priority:
THREAD_PRIORITY_ABOVE_NORMAL Precision: 1.3 #Functions: 69
AvgBenchRuntimePerFunction: 10
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 6 Thread priority:
THREAD_PRIORITY_HIGHEST Precision: 0.4 #Functions: 69
AvgBenchRuntimePerFunction: 10
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 7 Thread priority:
THREAD_PRIORITY_NORMAL Precision: 1.0 #Functions: 69
AvgBenchRuntimePerFunction: 12
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 7 Thread priority:
THREAD_PRIORITY_ABOVE_NORMAL Precision: 0.7 #Functions: 69
AvgBenchRuntimePerFunction: 12
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 7 Thread priority:
THREAD_PRIORITY_HIGHEST Precision: 0.6 #Functions: 69
AvgBenchRuntimePerFunction: 12
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 8 Thread priority:
THREAD_PRIORITY_NORMAL Precision: 0.9 #Functions: 69
AvgBenchRuntimePerFunction: 13
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 8 Thread priority:
THREAD_PRIORITY_ABOVE_NORMAL Precision: 0.7 #Functions: 69
AvgBenchRuntimePerFunction: 13
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 8 Thread priority:
THREAD_PRIORITY_HIGHEST Precision: 0.4 #Functions: 69
AvgBenchRuntimePerFunction: 13
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 9 Thread priority:
THREAD_PRIORITY_NORMAL Precision: 0.9 #Functions: 69
AvgBenchRuntimePerFunction: 15
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 9 Thread priority:
THREAD_PRIORITY_ABOVE_NORMAL Precision: 0.9 #Functions: 69
AvgBenchRuntimePerFunction: -403
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 9 Thread priority:
THREAD_PRIORITY_HIGHEST Precision: 0.4 #Functions: 69
AvgBenchRuntimePerFunction: 15
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 10 Thread priority:
THREAD_PRIORITY_NORMAL Precision: 0.9 #Functions: 69
AvgBenchRuntimePerFunction: 16
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 10 Thread priority:
THREAD_PRIORITY_ABOVE_NORMAL Precision: 0.9 #Functions: 69
AvgBenchRuntimePerFunction: 16
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 10 Thread priority:
THREAD_PRIORITY_HIGHEST Precision: 0.7 #Functions: 69
AvgBenchRuntimePerFunction: 16
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 11 Thread priority:
THREAD_PRIORITY_NORMAL Precision: 1.0 #Functions: 69
AvgBenchRuntimePerFunction: 18
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 11 Thread priority:
THREAD_PRIORITY_ABOVE_NORMAL Precision: 0.9 #Functions: 69
AvgBenchRuntimePerFunction: 18
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 11 Thread priority:
THREAD_PRIORITY_HIGHEST Precision: 0.6 #Functions: 69
AvgBenchRuntimePerFunction: 18
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 12 Thread priority:
THREAD_PRIORITY_NORMAL Precision: 0.9 #Functions: 69
AvgBenchRuntimePerFunction: 20
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 12 Thread priority:
THREAD_PRIORITY_ABOVE_NORMAL Precision: 0.9 #Functions: 69
AvgBenchRuntimePerFunction: 19
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 12 Thread priority:
THREAD_PRIORITY_HIGHEST Precision: 0.6 #Functions: 69
AvgBenchRuntimePerFunction: 19
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 13 Thread priority:
THREAD_PRIORITY_NORMAL Precision: 1.2 #Functions: 69
AvgBenchRuntimePerFunction: 21
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 13 Thread priority:
THREAD_PRIORITY_ABOVE_NORMAL Precision: 0.9 #Functions: 69
AvgBenchRuntimePerFunction: 21
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 13 Thread priority:
THREAD_PRIORITY_HIGHEST Precision: 0.4 #Functions: 69
AvgBenchRuntimePerFunction: 21
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 14 Thread priority:
THREAD_PRIORITY_NORMAL Precision: 0.7 #Functions: 69
AvgBenchRuntimePerFunction: 23
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 14 Thread priority:
THREAD_PRIORITY_ABOVE_NORMAL Precision: 0.9 #Functions: 69
AvgBenchRuntimePerFunction: 23
MAXNOOFRUNSSUB1: 63000 MAXNOOFRUNSSUB2: 3420 NOOFRERUNS: 14 Thread priority:
THREAD_PRIORITY_HIGHEST Precision: 0.4 #Functions: 69
AvgBenchRuntimePerFunction: 23 |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Sun Mar 18, 2007 10:24 pm Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi
I tested the subbenchweigths with release 0.5.0 and they were fine - approx.
1% off.
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Sun Mar 18, 2007 10:38 pm Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi
Time for status:
Is the benchmark realistic?
Is the validation thorough, proper and correct?
Is the benchmark stable?
Is the function size file complete and correct?
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Mon Mar 19, 2007 12:08 am Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi
Could somebody review this validation function?
function TMainForm.Validate13 : Boolean;
var
I, J : Cardinal;
MemBlock, Page1, Page2: Pointer;
C,Dummy: Cardinal;
const
PAGE_SIZE : Cardinal = 4096;
S_LEN : Cardinal = 10;
begin
GetMem(MemBlock, PAGE_SIZE * 2);
try
Result := False;
Page1 := Pointer((Cardinal(MemBlock) or (PAGE_SIZE-1))+1);
Page2 := Pointer(Cardinal(Page1) + PAGE_SIZE);
for J := 0 to 15 do
begin
for I := 0 to S_LEN-1 do
PChar(Cardinal(Page2) - S_LEN - 1 - J + Cardinal(I))^ :=
Char((I+Ord('0')) and $FF);
//Write input string zero terminator
PChar(Cardinal(Page2) - 1 - J)^ := #0;
//Write input string length field
PInteger(Cardinal(Page2) - S_LEN - 4 - J)^ := S_LEN;
//Write input string refcount field
PInteger(Cardinal(Page2) - S_LEN - 8 - J)^ := 1;
try {Lock Second Page}
Win32Check(VirtualProtect(Page2, PAGE_SIZE, PAGE_NOACCESS, Dummy));
try
Result := True;
C := Cardinal(Page2) - S_LEN - J;
TrimFunction(String(C));
except
Result := False;
Exit;
end;
finally {Unlock Second Page}
Win32Check(VirtualProtect(Page2, PAGE_SIZE, PAGE_EXECUTE_READWRITE,
Dummy));
end;
end;
finally
FreeMem(MemBlock);
end;
end;
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Mon Mar 19, 2007 12:09 am Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi
This one also needs a review
//Based on validate12 from CharPosIEx by John O'Harrow
//The string is S_LEN chars and located at the upper page boundary
function TMainForm.Validate18 : Boolean;
var
I, J : Cardinal;
MemBlock, Page1, Page2, Page3 : Pointer;
C,Dummy: Cardinal;
C1 : Char;
const
PAGE_SIZE : Cardinal = 4096;
S_LEN : Cardinal = 4096-8;
VALIDATENO : Cardinal = 18;
begin
GetMem(MemBlock, PAGE_SIZE * 3);
try
Result := False;
Page1 := Pointer((Cardinal(MemBlock) or (PAGE_SIZE-1))+1);
Page2 := Pointer(Cardinal(Page1) + PAGE_SIZE);
Page3 := Pointer(Cardinal(Page2) + PAGE_SIZE);
try {Lock first Page}
Win32Check(VirtualProtect(Page1, PAGE_SIZE, PAGE_NOACCESS, Dummy));
try {Lock third Page}
Win32Check(VirtualProtect(Page3, PAGE_SIZE, PAGE_NOACCESS, Dummy));
//Write string data at entire page
for I := 0 to PAGE_SIZE-1 do
begin
C1 := Char(I mod 255) ;
PChar(Cardinal(Page2) + Cardinal(I))^ := C1;
end;
//Write input string zero terminator at the last byte in the page
PChar(Cardinal(Page3) - 1)^ := #0;
//Write input string refcount field at the first integer in the page
PInteger(Cardinal(Page2))^ := 1;
//Write input string length field at the second integer in the page
PInteger(Cardinal(Page2)+4)^ := S_LEN;
try
Result := True;
C := Cardinal(Page2) + 8;
TrimFunction(String(C));
except
Result := False;
ErrorTrap(VALIDATENO, String(C));
Exit;
end;
finally {Unlock third Page}
Win32Check(VirtualProtect(Page3, PAGE_SIZE, PAGE_EXECUTE_READWRITE,
Dummy));
end;
finally {Unlock first Page}
Win32Check(VirtualProtect(Page1, PAGE_SIZE, PAGE_EXECUTE_READWRITE,
Dummy));
end;
finally
FreeMem(MemBlock);
end;
end;
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Mon Mar 19, 2007 12:13 am Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi
IMHO:
| Quote: | Is the benchmark realistic?
|
I think yes - not perfect, but quite good
| Quote: | Is the validation thorough, proper and correct?
|
I think it is quite good.
We need to review Validate13 and Validate18.
Could use one more validation of type Validate18, but with more testcases.
We need to wait for the result of the non-nil .... poll.
| Quote: | Is the benchmark stable?
|
Yes, but we are waiting for proff
| Quote: | Is the function size file complete and correct?
|
No
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Jouni Turunen Guest
|
Posted: Mon Mar 19, 2007 8:20 pm Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi Dennis,
| Quote: |
Could you please run "bench test" on your PC's and check that precisions is
better than 1%.
|
With 0.6.0 or with 0.6.1 when released? Presler with 0.6.0 shows 6%.
Regards,
Jouni
--
The Fastcode Project: http://www.fastcodeproject.org/ |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Mon Mar 19, 2007 10:02 pm Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi
| Quote: | With 0.6.0 or with 0.6.1 when released? Presler with 0.6.0 shows 6%.
|
That is really bad.
I am testing 0.6.1 now.
No need to test any further on 0.6.0.
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Mon Mar 19, 2007 10:03 pm Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi
FastMM4 validation is also missing.
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Mon Mar 19, 2007 10:23 pm Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi
Have you observed the warnings some of my functions give?
Are they bogus?
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Mon Mar 19, 2007 10:30 pm Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi
Both functions allocate one pagesize to little
function TMainForm.Validate13 : Boolean;
GetMem(MemBlock, PAGE_SIZE * 2);
should be
function TMainForm.Validate13 : Boolean;
GetMem(MemBlock, PAGE_SIZE * 3);
and
function TMainForm.Validate18 : Boolean;
GetMem(MemBlock, PAGE_SIZE * 3);
should be
function TMainForm.Validate18 : Boolean;
GetMem(MemBlock, PAGE_SIZE * 4);
It has been correct in all releases - I just made the bug in 0.6.1 and fixed
it again prior to release.
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Charalabos Michael Guest
|
Posted: Mon Mar 26, 2007 4:59 am Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hello Dennis,
| Quote: | http://tech.groups.yahoo.com/group/fastcodeproject/files/Trim/Version%200.6.
0/
Davy: I removed your failing function. Remember to give the fixed version a
new name, and it will be included in the next release.
A template function size file is included. It contains only sizes for JOH
functions. It would be nice if we all documented the function size in the
source as John do.
|
Is the Trim function stable enough to include it in the library ?
Thank you
--
Charalabos Michael - [Creation Power] - http://www.creationpower.gr |
|
| Back to top |
|
 |
Dennis Guest
|
Posted: Sat Mar 31, 2007 10:37 pm Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi
| Quote: | Is the Trim function stable enough to include it in the library ?
|
Version = 0.6.0 < 1.0.0 => No.
I really have to get it up to 1.0.0. Benchmark stability is main main
problem. My second problem is that I can not cope with more work than I do
at my new job.
Best regards
Dennis Kjaer Christensen |
|
| Back to top |
|
 |
Davy Landman Guest
|
Posted: Sun Apr 01, 2007 8:11 am Post subject: Re: Fastcode Trim B&V 0.6.0 |
|
|
Hi,
I saw that it was needed to create the funtion size file... I looked at the
..MAP file and could calculate the function size, but when looking at john's
functions I noticed he had more precision.. I could only get the size
rounded by a DWORD size... while John got the exact size... how is that
done?
Kind regards,
Davy Landman
"Dennis" <marianndkc (AT) home3 (DOT) gvdnet.dk> wrote in message
news:460e9c47$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi
Is the Trim function stable enough to include it in the library ?
Version = 0.6.0 < 1.0.0 => No.
I really have to get it up to 1.0.0. Benchmark stability is main main
problem. My second problem is that I can not cope with more work than I do
at my new job.
Best regards
Dennis Kjaer Christensen
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|