[fpc-devel] Faster Implementation for IntToStr
Amir
amir at aavani.net
Sun Sep 2 09:46:58 CEST 2012
Check the attachments on this email.
Amir
On 09/02/2012 12:07 PM, Amir wrote:
> Hi,
>
> In one of my project, I have to call IntToStr more than 10M times. I
> noticed that IntToStr calls Str function. I implemented my own version
> of IntToStr which is almost twice faster than the current implementation
> of IntToStr. I wonder if it is possible to use my code in IntToStr
> function.
>
> I attached my function, and also a sample code which calls MyIntToStr
> and IntToStr 1000 times. I used valgrind to compare the performance of
> the two function.
>
> Amir
> P.S. I understand that my code is not easy to read/understand, but the
> question is, should the code for a library be readable/easy to understand?
>
> P.S. I compiled the project using
> fpc -Sd -O3 IntToStr.lpr
>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
-------------- next part --------------
program IntToStr;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, SysUtils
{ you can add units after this };
function MyIntToStr (n: Integer): AnsiString;
const
Pow10: array [0..9] of Integer=
(1, 10, 100, 1000, 10000, 100000, 1000000,
10000000, 100000000, 1000000000);
function GetLength (n: Integer): Integer;
var
Top, Bot, Mid: Integer;
begin
Bot:= 0; Top:= 9;
if Pow10 [Top]<= n then
Exit (Top+ 1);
if n<= Pow10 [Bot] then
Exit (Bot+ 1);
while Bot<= Top do
begin
Mid:= (Top+ Bot) shr 1;
if n< Pow10 [Mid] then
Top:= Mid- 1
else if Pow10 [Mid]<= n then
Bot:= Mid+ 1
else
Exit (Mid+ 1);
end;
Result:= Bot;
end;
var
RightPtr: PChar;
Len: Integer;
IsNegative: Boolean;
begin
if n< 0 then
begin
n:= -n;
IsNegative:= True;
end
else
IsNegative:= False;
if n= 0 then
Exit ('0');
Len:= 0;
if Pow10 [High (Pow10)]< n then
Len:= High (Pow10)+ 1
else
while Pow10 [Len]<= n do
Inc (Len);
if IsNegative then
Inc (Len);
SetLength (Result, Len);
RightPtr:= @(Result [1])+ Len- 1;
while n<> 0 do
begin
RightPtr^:= char (48+ (n mod 10));
n:= n div 10;
Dec (RightPtr);
end;
if IsNegative then
Result [1]:= '-';
end;
var
i: Integer;
n: Integer;
begin
for i:= 0 to 1000 do
begin
n:= Random (MaxInt)- MaxInt div 2;
WriteLn (SysUtils.IntToStr (n), '.');
WriteLn (MyIntToStr (n), '.');
end;
end.
-------------- next part --------------
version: 1
creator: callgrind-3.7.0
pid: 16913
cmd: ./IntToStr
part: 1
desc: I1 cache:
desc: D1 cache:
desc: LL cache:
desc: Timerange: Basic block 0 - 405678
desc: Trigger: Program termination
positions: line
events: Ir
summary: 2320476
ob=(1) /home/Amir/Desktop/Temp/Amir/Code/IntToStr
fl=(2) /home/Amir/Desktop/Temp/Amir/Code//IntToStr.lpr
fn=(274) P$INTTOSTR_MYINTTOSTR$LONGINT$$ANSISTRING
51 7007
+1 3003
+2 1515
+1 1010
+4 496
+2 3003
+3 1001
+2 3003
+1 154
+3 8210
-1 45670
+3 2002
+1 505
+1 1515
cfi=(1) ???
cfn=(244) fpc_ansistr_setlength
calls=505 -74
* 68175
* 1488
cfi=(1)
cfn=(244)
calls=496 -74
* 66960
+1 5005
+2 1001
+2 53880
+1 44900
+1 8980
-4 29943
+8 2002
+1 1010
cfi=(1)
cfn=(276) fpc_ansistr_unique
calls=505 -86
* 7575
* 505
+2 6006
fn=(2) main
94 7
cfi=(1)
cfn=(4) fpc_initializeunits
calls=1 -94
* 64793
* 7
cfi=(1)
cfn=(142) fpc_pushexceptaddr
calls=1 -94
* 24
* 2
cfi=(1)
cfn=(144) fpc_setjmp
calls=1 -94
* 12
* 3
+1 4
+2 2
cfi=(1)
cfn=(228) SYSTEM_RANDOM$LONGINT$$LONGINT
calls=1 -97
* 33740
-2 1000
+2 2000
cfi=(1)
cfn=(228)
calls=1000 -97
* 68837
* 3003
+1 1001
cfi=(1)
cfn=(234) fpc_get_output
calls=1001 -98
* 9009
* 3003
cfi=(1)
cfn=(152) fpc_ansistr_decr_ref
calls=1001 -98
* 118009
* 4004
cfi=(1)
cfn=(236) SYSUTILS_INTTOSTR$LONGINT$$ANSISTRING
calls=1001 -98
* 621375
* 4004
cfi=(1)
cfn=(250) fpc_write_text_ansistr
calls=1001 -98
* 142530
* 1001
cfi=(1)
cfn=(254) fpc_iocheck
calls=1001 -98
* 13013
* 4004
cfi=(1)
cfn=(256) fpc_write_text_char
calls=1001 -98
* 34034
* 1001
cfi=(1)
cfn=(254)
calls=1001 -98
* 13013
* 2002
cfi=(1)
cfn=(258) fpc_writeln_end
calls=1001 -98
* 180180
* 1001
cfi=(1)
cfn=(254)
calls=1001 -98
* 13013
+1 1001
cfi=(1)
cfn=(234)
calls=1001 -99
* 9009
* 3003
cfi=(1)
cfn=(152)
calls=1001 -99
* 118118
* 4004
cfn=(274)
calls=1001 -48
* 375524
* 4004
cfi=(1)
cfn=(250)
calls=1001 -99
* 142530
* 1001
cfi=(1)
cfn=(254)
calls=1001 -99
* 13013
* 4004
cfi=(1)
cfn=(256)
calls=1001 -99
* 34034
* 1001
cfi=(1)
cfn=(254)
calls=1001 -99
* 13013
* 2002
cfi=(1)
cfn=(258)
calls=1001 -99
* 180180
* 1001
cfi=(1)
cfn=(254)
calls=1001 -99
* 13013
-4 2003
cfi=(1)
cfn=(148) fpc_popaddrstack
calls=1 -95
* 17
+7 2
cfi=(1)
cfn=(152)
calls=1 0
* 118
* 5
cfi=(1)
cfn=(278) SYSTEM_DO_EXIT
calls=1 0
* 60231
fl=(1)
fn=(14) SYSTEM_CHECKINITIALSTKLEN$QWORD$$QWORD
0 9
cfn=(16) SYSTEM_FILLCHAR$formal$INT64$BYTE
calls=1 0
0 29
0 6
cfn=(18) SYSTEM_FPGETRLIMIT$LONGINT$PRLIMIT$$LONGINT
calls=1 0
0 18
0 12
fn=(72) fpc_shortstr_concat
0 138
cfn=(40) SYSTEM_MOVE$formal$formal$INT64
calls=4 0
0 84
0 15
cfn=(40)
calls=1 0
0 42
0 4
cfn=(40)
calls=1 0
0 73
0 56
fn=(84) SYSTEM_FPSYSCALL$INT64$INT64$$INT64
0 30
fn=(86) fpc_shortstr_to_shortstr
0 52
cfn=(40)
calls=4 0
0 133
0 20
fn=(96) UNIX_READTIMEZONEFILE$SHORTSTRING_READBUF$formal$SMALLINT$$SMALLINT
0 651
cfn=(40)
calls=22 0
0 774
0 225
cfn=(98) UNIX_READTIMEZONEFILE$SHORTSTRING_READFILEBUF
calls=1 0
0 38
0 155
fn=(110) SYSTEM_TRY_FINISH_WAITFIXEDLIST$PFREELISTS$$BOOLEAN
0 70
fn=(118) SYSTEM_FPSYSCALL$INT64$INT64$INT64$INT64$INT64$INT64$INT64$$INT64
0 75
fn=(146) SYSTEM_TOBJECT_$__CREATE$$TOBJECT
0 135
cfn=(138) SYSTEM_TOBJECT_$__NEWINSTANCE$$TOBJECT
calls=5 0
0 802
0 89
cfn=(142)
calls=12 0
0 288
0 24
cfn=(144)
calls=12 0
0 144
0 128
cfn=(154) SYSTEM_TOBJECT_$__AFTERCONSTRUCTION
calls=5 0
0 5
0 12
cfn=(148)
calls=12 0
0 204
0 96
fn=(166) CLASSES_COMMONINIT
0 3
cfn=(168) SYSTEM_INITCRITICALSECTION$TRTLCRITICALSECTION
calls=1 0
0 14
0 1
cfn=(172) SYSTEM_RTLEVENTCREATE$$PRTLEVENT
calls=1 0
0 15
0 3
cfn=(172)
calls=1 0
0 15
0 5
cfn=(176) SYSTEM_GETCURRENTTHREADID$$QWORD
calls=1 0
0 21
0 4
cfn=(168)
calls=1 0
0 14
0 7
cfn=(180) CLASSES_TTHREADLIST_$__CREATE$$TTHREADLIST
calls=1 0
0 7777
0 5
cfn=(180)
calls=1 0
0 1112
0 5
cfn=(146)
calls=1 0
0 273
0 6
cfn=(184) SYSUTILS_TMULTIREADEXCLUSIVEWRITESYNCHRONIZER_$__CREATE$$TMULTIREADEXCLUSIVEWRITESYNCHRONIZER
calls=1 0
0 526
0 6
cfn=(204) fpc_intf_incr_ref
calls=1 0
0 27
0 2
cfn=(212) fpc_intf_decr_ref
calls=1 0
0 8
0 6
cfn=(214) CLASSES_REGISTERINITCOMPONENTHANDLER$TCOMPONENTCLASS$TINITCOMPONENTHANDLER
calls=1 0
0 1266
0 2
fn=(170) SYSTEM_NOCRITICALSECTION$formal
0 136
fn=(172)
0 12
cfn=(174) SYSTEM_NORTLEVENTCREATE$$PRTLEVENT
calls=3 0
0 27
0 6
fn=(176)
0 4
cfn=(178) SYSTEM_NOGETCURRENTTHREADID$$QWORD
calls=1 0
0 15
0 2
fn=(202) SYSTEM_DECLOCKED$LONGINT$$BOOLEAN
0 10
fn=(230) SYSTEM_GENRAND_MT19937$$LONGINT
0 10021
cfn=(232) SYSTEM_SGENRAND_MT19937$LONGINT
calls=1 0
0 11844
0 66698
fn=(240) SYSTEM_INT_STR$INT64$OPENSTRING
0 248571
fn=(280) SYSTEM_INTERNALEXIT
0 9
cfn=(282) SYSTEM_FINALIZEUNITS
calls=1 0
0 39511
0 11
cfn=(408) SYSTEM_SYSFLUSHSTDIO
calls=1 0
0 183
0 3
cfn=(270) SYSTEM_SYSFREEMEM$POINTER$$QWORD
calls=1 0
0 23
0 1
cfn=(412) SYSTEM_FINALIZEHEAP
calls=1 0
0 20479
0 4
fn=(304) CLASSES_TTHREADLIST_$__UNLOCKLIST
0 9
cfn=(306) SYSTEM_LEAVECRITICALSECTION$TRTLCRITICALSECTION
calls=3 0
0 42
0 6
fn=(312) SYSTEM_TOBJECT_$__BEFOREDESTRUCTION
0 12
fn=(356) SYSTEM_RTLEVENTDESTROY$PRTLEVENT
0 12
cfn=(358) SYSTEM_NORTLEVENTDESTROY$PRTLEVENT
calls=3 0
0 24
0 6
fn=(388) fpc_unicodestr_decr_ref
0 9
fn=(392) UNIX_finalize
0 2
cfn=(394) UNIX_DONELOCALTIME
calls=1 0
0 17946
0 2
fn=(6) SYSTEM_FPC_CPUINIT
0 5
cfn=(8) SYSTEM_SYSRESETFPU
calls=1 0
0 22
0 5
cfn=(10) SYSTEM_SYSINITFPU
calls=1 0
0 20
0 2
fn=(10)
0 40
fn=(16)
0 1685
fn=(26) SYSTEM_FPSIGACTION$LONGINT$PSIGACTIONREC$PSIGACTIONREC$$LONGINT
0 76
cfn=(28) SYSTEM_FPSYSCALL$INT64$INT64$INT64$INT64$INT64$$INT64
calls=4 0
0 52
0 8
fn=(32) SYSTEM_SYSINITEXCEPTIONS
0 17
fn=(62) UNIX_init
0 2
cfn=(64) UNIX_INITLOCALTIME
calls=1 0
0 47145
0 2
fn=(80) SYSTEM_POS$CHAR$SHORTSTRING$$INT64
0 91
fn=(94) fpc_pchar_to_shortstr
0 25
cfn=(86)
calls=1 0
0 39
0 6
fn=(114) SYSTEM_SYSOSALLOC$QWORD$$POINTER
0 45
cfn=(116) SYSTEM_FPMMAP$POINTER$QWORD$LONGINT$LONGINT$LONGINT$INT64$$POINTER
calls=5 0
0 160
0 30
cfn=(120) SYSTEM_SETERRNO$LONGINT
calls=5 0
0 65
0 20
fn=(120)
0 65
fn=(122) UNIX_READTIMEZONEFILE$SHORTSTRING_READBUFBYTE$$BYTE
0 180
fn=(130) UNIX_FIND_TRANSITION$LONGINT$$PTTINFO
0 515
fn=(132) SYSUTILS_init
0 3
cfn=(134) SYSUTILS_INITEXCEPTIONS
calls=1 0
0 929
0 1
cfn=(156) SYSUTILS_INITINTERNATIONAL
calls=1 0
0 2967
0 3
cfn=(152)
calls=1 0
0 9
0 8
fn=(150) fpc_ansistr_incr_ref
0 11029
cfn=(246) SYSTEM_INCLOCKED$INT64
calls=1001 0
0 8008
0 2006
fn=(162) TYPINFO_init_implicit
0 3
fn=(190) SYSTEM_RTLEVENTRESETEVENT$PRTLEVENT
0 8
cfn=(192) SYSTEM_NORTLEVENTRESETEVENT$PRTLEVENT
calls=2 0
0 16
0 4
fn=(262) SYSTEM_DO_WRITE$LONGINT$POINTER$LONGINT$$LONGINT
0 26026
cfn=(264) SYSTEM_FPWRITE$LONGINT$PCHAR$QWORD$$INT64
calls=2002 0
0 40040
0 4004
cfn=(266) SYSTEM_GETERRNO$$LONGINT
calls=2002 0
0 20020
0 44044
fn=(264)
0 12012
cfn=(46) SYSTEM_FPSYSCALL$INT64$INT64$INT64$INT64$$INT64
calls=2002 0
0 24024
0 4004
fn=(266)
0 20020
fn=(318) SYSUTILS_FREEANDNIL$formal
0 20
cfn=(308) SYSTEM_TOBJECT_$__FREE
calls=1 0
0 7
cfn=(309) SYSTEM_TOBJECT_$__FREE'2
calls=3 0
0 742
0 8
fn=(354) SYSTEM_TINTERFACEDOBJECT_$__BEFOREDESTRUCTION
0 6
fn=(378) SYSUTILS_finalize
0 2
cfn=(380) SYSUTILS_FREEDRIVESTR
calls=1 0
0 192
0 1
cfn=(382) SYSUTILS_DONEEXCEPTIONS
calls=1 0
0 503
0 3
cfn=(340) fpc_finalize
calls=1 0
0 2260
0 2
cfn=(152)
calls=1 0
0 14
0 4
cfn=(152)
calls=1 0
0 14
0 4
cfn=(152)
calls=1 0
0 9
0 4
cfn=(388)
calls=1 0
0 9
0 5
cfn=(340)
calls=1 0
0 61
0 3
cfn=(340)
calls=1 0
0 61
0 2
cfn=(152)
calls=1 0
0 14
0 4
cfn=(152)
calls=1 0
0 9
0 4
fn=(386) SYSTEM_RECORDRTTI$POINTER$POINTER$TRTTIPROC
0 27
cfn=(341) fpc_finalize'2
calls=1 0
0 34
0 60
cfn=(341)
calls=10 0
0 2066
0 40
fn=(396) SYSTEM_FREE_OSCHUNK$PFREELISTS$POSCHUNK
0 35
cfn=(398) SYSTEM_REMOVE_FREED_FIXED_CHUNKS$POSCHUNK
calls=5 0
0 37591
0 97
cfn=(400) SYSTEM_SYSOSFREE$POINTER$QWORD
calls=5 0
0 110
0 20
fn=(400)
0 10
cfn=(402) SYSTEM_FPMUNMAP$POINTER$QWORD$$LONGINT
calls=5 0
0 90
0 10
fn=(12) SYSTEM_init
0 3
cfn=(8)
calls=1 0
0 22
0 5
cfn=(10)
calls=1 0
0 20
0 5
cfn=(14)
calls=1 0
0 74
0 27
cfn=(22) SYSTEM_INSTALLSIGNALS
calls=1 0
0 395
0 1
cfn=(30) SYSTEM_INITHEAP
calls=1 0
0 184
0 1
cfn=(32)
calls=1 0
0 17
0 1
cfn=(34) SYSTEM_SYSINITSTDIO
calls=1 0
0 1395
0 1
cfn=(48) SYSTEM_SYSINITEXECPATH
calls=1 0
0 39
0 8
cfn=(52) SYSTEM_INITSYSTEMTHREADS
calls=1 0
0 188
0 1
cfn=(58) SYSTEM_INITVARIANTMANAGER
calls=1 0
0 1
0 1
cfn=(60) SYSTEM_INITUNICODESTRINGMANAGER
calls=1 0
0 43
0 6
fn=(30)
0 14
cfn=(16)
calls=1 0
0 80
0 7
cfn=(16)
calls=1 0
0 80
0 3
fn=(74) SYSTEM_FPOPEN$PCHAR$LONGINT$LONGINT$$LONGINT
0 16
cfn=(46)
calls=2 0
0 24
0 4
fn=(154)
0 12
fn=(156)
0 2
cfn=(158) SYSUTILS_INITINTERNATIONALGENERIC
calls=1 0
0 96
0 1
cfn=(160) SYSUTILS_INITANSI
calls=1 0
0 2866
0 2
fn=(174)
0 27
fn=(178)
0 15
fn=(188) SYSTEM_INITINTERFACEPOINTERS$TCLASS$POINTER
0 63
fn=(196) SYSTEM_BASICEVENTCREATE$POINTER$BOOLEAN$BOOLEAN$ANSISTRING$$POINTER
0 8
cfn=(198) SYSTEM_NOBASICEVENTCREATE$POINTER$BOOLEAN$BOOLEAN$ANSISTRING$$POINTER
calls=1 0
0 10
0 2
fn=(198)
0 10
fn=(228)
0 7007
cfn=(230)
calls=1001 0
0 88563
0 7007
fn=(244)
0 34034
cfn=(140) SYSTEM_GETMEM$POINTER$QWORD
calls=2002 0
0 196198
0 40040
fn=(248) SYSTEM_DECLOCKED$INT64$$BOOLEAN
0 30030
fn=(250)
0 86086
cfn=(252) SYSTEM_FPC_WRITEBUFFER$TEXT$formal$INT64
calls=2002 0
0 186962
0 12012
fn=(288) WRPR_SYSUTILS_TMULTIREADEXCLUSIVEWRITESYNCHRONIZER_$_IREADWRITESYNC_$_5_$_SYSUTILS_TMULTIREADEXCLUSIVEWRITESYNCHRONIZER_$__BEGINWRITE$$BOOLEAN
0 2
cfn=(290) SYSUTILS_TMULTIREADEXCLUSIVEWRITESYNCHRONIZER_$__BEGINWRITE$$BOOLEAN
calls=1 0
0 86
fn=(298) SYSTEM_INTERLOCKEDEXCHANGEADD$LONGINT$LONGINT$$LONGINT
0 8
fn=(306)
0 12
cfn=(170)
calls=3 0
0 24
0 6
fn=(308)
0 83
cfn=(314) CLASSES_TLIST_$__DESTROY
calls=1 0
0 662
cfn=(324) SYSTEM_TOBJECT_$__DESTROY
calls=3 0
0 620
cfn=(332) CLASSES_TSTRINGLIST_$__DESTROY
calls=1 0
0 381
cfn=(310) CLASSES_TTHREADLIST_$__DESTROY
calls=2 0
0 1430
0 22
fn=(309)
0 45
cfn=(320) CLASSES_TFPLIST_$__DESTROY
calls=3 0
0 709
cfn=(314)
calls=2 0
0 796
0 10
fn=(320)
0 36
cfn=(312)
calls=3 0
0 3
0 6
cfn=(322) CLASSES_TFPLIST_$__CLEAR
calls=3 0
0 181
0 9
cfn=(324)
calls=3 0
0 51
0 24
cfn=(326) SYSTEM_TOBJECT_$__FREEINSTANCE
calls=3 0
0 387
0 12
fn=(326)
0 65
cfn=(328) SYSTEM_TOBJECT_$__CLEANUPINSTANCE
calls=13 0
0 691
0 26
cfn=(268) SYSTEM_FREEMEM$POINTER$$QWORD
calls=13 0
0 1124
0 39
fn=(358)
0 24
fn=(406) OBJPAS_FINALIZERESOURCETABLES
0 1220
cfn=(152)
calls=597 0
0 8353
0 4797
fn=(4)
0 4
cfn=(6)
calls=1 0
0 54
0 67
cfn=(164) CLASSES_init
calls=1 0
0 11127
cfn=(162)
calls=1 0
0 3
cfn=(132)
calls=1 0
0 3920
cfn=(62)
calls=1 0
0 47149
cfn=(12)
calls=1 0
0 2438
0 31
fn=(46)
0 24132
fn=(68) BASEUNIX_FPOPEN$SHORTSTRING$LONGINT$$LONGINT
0 16
cfn=(70) SYSTEM_FPC_SHORTSTR_ASSIGN$LONGINT$POINTER$POINTER
calls=2 0
0 149
0 10
cfn=(72)
calls=2 0
0 124
0 8
cfn=(74)
calls=2 0
0 44
0 6
fn=(78) SYSTEM_FPREAD$LONGINT$PCHAR$QWORD$$INT64
0 12
cfn=(46)
calls=2 0
0 24
0 4
fn=(106) SYSTEM_SYSGETMEM$QWORD$$POINTER
0 32320
cfn=(108) SYSTEM_SYSGETMEM_FIXED$QWORD$$POINTER
calls=2020 0
0 172254
0 14140
fn=(126) UNIX_GETLOCALTIMEZONE$LONGINT
0 4
cfn=(128) UNIX_GETLOCALTIMEZONE$LONGINT$LONGINT$LONGINT
calls=1 0
0 693
0 2
fn=(144)
0 12408
fn=(184)
0 13
cfn=(186) SYSTEM_TINTERFACEDOBJECT_$__NEWINSTANCE$$TOBJECT
calls=1 0
0 252
0 8
cfn=(142)
calls=1 0
0 24
0 2
cfn=(144)
calls=1 0
0 12
0 7
cfn=(142)
calls=1 0
0 24
0 2
cfn=(144)
calls=1 0
0 12
0 5
cfn=(168)
calls=1 0
0 14
0 1
cfn=(172)
calls=1 0
0 15
0 3
cfn=(190)
calls=1 0
0 14
0 3
cfn=(194) SYSTEM_INTERLOCKEDEXCHANGE$LONGINT$LONGINT$$LONGINT
calls=1 0
0 7
0 3
cfn=(194)
calls=1 0
0 7
0 5
cfn=(196)
calls=1 0
0 20
0 2
cfn=(148)
calls=1 0
0 17
0 13
cfn=(200) SYSTEM_TINTERFACEDOBJECT_$__AFTERCONSTRUCTION
calls=1 0
0 15
0 1
cfn=(148)
calls=1 0
0 17
0 8
fn=(192)
0 16
fn=(194)
0 21
fn=(208) SYSTEM_TINTERFACEDOBJECT_$___ADDREF$$LONGINT
0 3
cfn=(210) SYSTEM_INTERLOCKEDINCREMENT$LONGINT$$LONGINT
calls=1 0
0 10
0 2
fn=(226) CLASSES_TLIST_$__NOTIFY$POINTER$TLISTNOTIFICATION
0 2
fn=(234)
0 18018
fn=(252)
0 104104
cfn=(40)
calls=4004 0
0 160936
0 32032
fn=(276)
0 7575
fn=(302) CLASSES_TTHREADLIST_$__LOCKLIST$$TLIST
0 15
cfn=(292) SYSTEM_ENTERCRITICALSECTION$TRTLCRITICALSECTION
calls=3 0
0 42
0 12
fn=(332)
0 15
cfn=(312)
calls=1 0
0 1
0 25
cfn=(334) CLASSES_TSTRINGLIST_$__SETCAPACITY$LONGINT
calls=1 0
0 20
0 3
cfn=(336) CLASSES_TSTRINGS_$__DESTROY
calls=1 0
0 57
0 9
cfn=(326)
calls=1 0
0 244
0 7
fn=(336)
0 11
cfn=(338) CLASSES_TPERSISTENT_$__DESTROY
calls=1 0
0 37
0 9
fn=(344) CLASSES_REMOVEFIXUPREFERENCES$TCOMPONENT$ANSISTRING
0 9
fn=(370) CLASSES_TFPLIST_$__DELETE$LONGINT
0 28
cfn=(40)
calls=1 0
0 12
0 8
fn=(382)
0 7
cfn=(308)
calls=1 0
0 244
0 6
cfn=(308)
calls=1 0
0 244
0 2
fn=(384) SYSUTILS_EHEAPMEMORYERROR_$__FREEINSTANCE
0 8
cfn=(326)
calls=2 0
0 404
0 4
fn=(394)
0 7
cfn=(268)
calls=1 0
0 116
0 6
cfn=(268)
calls=1 0
0 116
0 6
cfn=(268)
calls=1 0
0 116
0 6
cfn=(268)
calls=1 0
0 17562
0 11
fn=(402)
0 25
cfn=(20) SYSTEM_FPSYSCALL$INT64$INT64$INT64$$INT64
calls=5 0
0 55
0 10
fn=(410) SYSTEM_FLUSH$TEXT
0 72
cfn=(260) SYSTEM_FILEWRITEFUNC$TEXTREC
calls=4 0
0 32
0 12
fn=(18)
0 5
cfn=(20)
calls=1 0
0 11
0 2
fn=(20)
0 66
fn=(34)
0 10
cfn=(36) SYSTEM_OPENSTDIO$TEXT$LONGINT$LONGINT
calls=1 0
0 239
0 9
cfn=(36)
calls=1 0
0 277
0 9
cfn=(36)
calls=1 0
0 277
0 9
cfn=(36)
calls=1 0
0 277
0 9
cfn=(36)
calls=1 0
0 277
0 2
fn=(44) SYSTEM_FPIOCTL$LONGINT$LONGINT$POINTER$$LONGINT
0 24
cfn=(46)
calls=4 0
0 48
0 8
fn=(56) SYSTEM_SETTHREADMANAGER$TTHREADMANAGER$$BOOLEAN
0 60
fn=(66) UNIX_GETTIMEZONEFILE$$SHORTSTRING
0 9
cfn=(68)
calls=1 0
0 191
0 8
cfn=(76) BASEUNIX_FPREAD$LONGINT$formal$QWORD$$INT64
calls=1 0
0 24
0 6
cfn=(80)
calls=1 0
0 91
0 9
cfn=(82) SYSTEM_FPCLOSE$LONGINT$$LONGINT
calls=1 0
0 17
0 4
cfn=(86)
calls=1 0
0 68
0 6
fn=(108)
0 62585
cfn=(110)
calls=5 0
0 70
0 30
cfn=(112) SYSTEM_ALLOC_OSCHUNK$PFREELISTS$QWORD$QWORD$$POINTER
calls=5 0
0 42841
0 66728
fn=(116)
0 75
cfn=(118)
calls=5 0
0 75
0 10
fn=(136) SYSUTILS_EXCEPTION_$__CREATE$ANSISTRING$$EXCEPTION
0 28
cfn=(138)
calls=2 0
0 322
0 16
cfn=(142)
calls=2 0
0 48
0 4
cfn=(144)
calls=2 0
0 24
0 14
cfn=(142)
calls=2 0
0 48
0 4
cfn=(144)
calls=2 0
0 24
0 12
cfn=(146)
calls=2 0
0 180
0 4
cfn=(150)
calls=2 0
0 22
0 4
cfn=(152)
calls=2 0
0 18
0 6
cfn=(148)
calls=2 0
0 34
0 26
cfn=(154)
calls=2 0
0 2
0 2
cfn=(148)
calls=2 0
0 34
0 16
fn=(142)
0 24816
fn=(158)
0 5
cfn=(16)
calls=1 0
0 29
0 62
fn=(180)
0 26
cfn=(138)
calls=2 0
0 6989
0 16
cfn=(142)
calls=2 0
0 48
0 4
cfn=(144)
calls=2 0
0 24
0 14
cfn=(142)
calls=2 0
0 48
0 4
cfn=(144)
calls=2 0
0 24
0 12
cfn=(146)
calls=2 0
0 180
0 6
cfn=(168)
calls=2 0
0 28
0 6
cfn=(182) CLASSES_TLIST_$__CREATE$$TLIST
calls=2 0
0 1342
0 4
cfn=(148)
calls=2 0
0 34
0 26
cfn=(154)
calls=2 0
0 2
0 2
cfn=(148)
calls=2 0
0 34
0 16
fn=(200)
0 3
cfn=(202)
calls=1 0
0 10
0 2
fn=(204)
0 8
cfn=(206) WRPR_SYSUTILS_TMULTIREADEXCLUSIVEWRITESYNCHRONIZER_$_IREADWRITESYNC_$_1_$_SYSTEM_TINTERFACEDOBJECT_$___ADDREF$$LONGINT
calls=1 0
0 17
0 2
fn=(212)
0 24
cfn=(346) WRPR_SYSUTILS_TMULTIREADEXCLUSIVEWRITESYNCHRONIZER_$_IREADWRITESYNC_$_2_$_SYSTEM_TINTERFACEDOBJECT_$___RELEASE$$LONGINT
calls=1 0
0 255
0 13
fn=(216) CLASSES_TLIST_$__GETCOUNT$$LONGINT
0 15
fn=(232)
0 11844
fn=(268)
0 8076
cfn=(270)
calls=2019 0
0 175088
0 4038
fn=(272) SYSTEM_SYSFREEMEM_FIXED$PFREELISTS$PMEMCHUNK_FIXED$$QWORD
0 68705
cfn=(342) SYSTEM_APPEND_TO_OSLIST$POSCHUNK
calls=5 0
0 17576
0 12125
fn=(328)
0 311
cfn=(340)
calls=3 0
0 112
0 268
fn=(330) SYSTEM_DONECRITICALSECTION$TRTLCRITICALSECTION
0 20
cfn=(170)
calls=5 0
0 40
0 10
fn=(340)
0 192
cfn=(152)
calls=2 0
0 28
0 12
cfn=(374) SYSTEM_ARRAYRTTI$POINTER$POINTER$TRTTIPROC
calls=2 0
0 400
0 6
cfn=(386)
calls=1 0
0 2227
0 3
cfn=(212)
calls=1 0
0 8
0 8
cfn=(390) fpc_dynarray_decr_ref
calls=2 0
0 32
0 36
fn=(341)
0 822
cfn=(152)
calls=53 0
0 742
0 122
cfn=(374)
calls=4 0
0 1746
0 232
fn=(366) CLASSES_TFPLIST_$__GET$LONGINT$$POINTER
0 38
fn=(414) SYSTEM_SYSTEM_EXIT
0 4
fn=(0) 0x0000000000400170
0 14
cfi=(2)
cfn=(2)
calls=1 94
0 2320462
fn=(36)
0 50
cfn=(38) SYSTEM_ASSIGN$TEXT$SHORTSTRING
calls=5 0
0 1050
0 86
cfn=(42) SYSTEM_DO_ISDEVICE$LONGINT$$BOOLEAN
calls=4 0
0 116
0 45
fn=(60)
0 43
fn=(64)
0 3
cfn=(66)
calls=1 0
0 433
0 2
cfn=(88) UNIX_READTIMEZONEFILE$SHORTSTRING
calls=1 0
0 45986
0 2
cfn=(124) SYSTEM_FPTIME$PTIME_T$$INT64
calls=1 0
0 16
0 2
cfn=(126)
calls=1 0
0 699
0 2
fn=(88)
0 9
cfn=(70)
calls=1 0
0 75
0 8
cfn=(90) BASEUNIX_FPGETENV$SHORTSTRING$$PCHAR
calls=1 0
0 1809
0 4
cfn=(94)
calls=1 0
0 70
0 4
cfn=(86)
calls=1 0
0 37
0 7
cfn=(86)
calls=1 0
0 61
0 9
cfn=(72)
calls=1 0
0 62
0 5
cfn=(72)
calls=1 0
0 164
0 3
cfn=(68)
calls=1 0
0 166
0 11
cfn=(96)
calls=1 0
0 156
0 7
cfn=(100) UNIX_READTIMEZONEFILE$SHORTSTRING_DECODE$LONGINT
calls=1 0
0 28
0 3
cfn=(100)
calls=1 0
0 28
0 3
cfn=(100)
calls=1 0
0 28
0 3
cfn=(100)
calls=1 0
0 28
0 3
cfn=(100)
calls=1 0
0 28
0 3
cfn=(100)
calls=1 0
0 28
0 12
cfn=(102) SYSTEM_REALLOCMEM$POINTER$QWORD$$POINTER
calls=1 0
0 1803
0 4
cfn=(102)
calls=1 0
0 5169
0 5
cfn=(102)
calls=1 0
0 10033
0 3
cfn=(102)
calls=1 0
0 19742
0 5
cfn=(102)
calls=1 0
0 24
0 8
cfn=(96)
calls=1 0
0 213
0 6
cfn=(96)
calls=1 0
0 125
0 16
cfn=(100)
calls=1 0
0 29
0 792
cfn=(100)
calls=99 0
0 2773
0 216
cfn=(96)
calls=1 0
0 80
0 45
cfn=(96)
calls=5 0
0 400
0 48
cfn=(96)
calls=6 0
0 390
0 48
cfn=(96)
calls=6 0
0 390
0 42
cfn=(100)
calls=6 0
0 168
0 78
cfn=(96)
calls=1 0
0 89
0 16
cfn=(122)
calls=1 0
0 15
0 15
cfn=(122)
calls=5 0
0 75
0 70
cfn=(122)
calls=1 0
0 15
0 15
cfn=(122)
calls=5 0
0 75
0 62
cfn=(82)
calls=1 0
0 17
0 5
fn=(104) SYSTEM_SYSREALLOCMEM$POINTER$QWORD$$POINTER
0 73
cfn=(270)
calls=1 0
0 78
0 37
cfn=(106)
calls=5 0
0 36716
0 52
fn=(164)
0 2
cfn=(166)
calls=1 0
0 11123
0 2
fn=(186)
0 2
cfn=(138)
calls=1 0
0 244
0 6
fn=(210)
0 20
fn=(214)
0 12
cfn=(182)
calls=1 0
0 671
0 5
cfn=(146)
calls=1 0
0 256
0 11
cfn=(142)
calls=1 0
0 24
0 2
cfn=(144)
calls=1 0
0 12
0 8
cfn=(216)
calls=1 0
0 3
0 5
cfn=(216)
calls=1 0
0 3
0 7
cfn=(218) CLASSES_TLIST_$__INSERT$LONGINT$POINTER
calls=1 0
0 224
0 1
cfn=(148)
calls=1 0
0 17
0 5
fn=(218)
0 8
cfn=(220) CLASSES_TFPLIST_$__INSERT$LONGINT$POINTER
calls=1 0
0 203
0 8
cfn=(226)
calls=1 0
0 1
0 4
fn=(254)
0 78078
fn=(256)
0 68068
fn=(282)
0 91
cfn=(404) OBJPAS_finalize
calls=1 0
0 14374
cfn=(392)
calls=1 0
0 17950
cfn=(378)
calls=1 0
0 3184
cfn=(376) TYPINFO_finalize_implicit
calls=1 0
0 167
cfn=(284) CLASSES_finalize
calls=1 0
0 3715
0 30
fn=(284)
0 2
cfn=(286) CLASSES_COMMONCLEANUP
calls=1 0
0 3378
0 5
cfn=(212)
calls=1 0
0 8
0 5
cfn=(340)
calls=1 0
0 315
0 2
fn=(290)
0 5
cfn=(292)
calls=1 0
0 14
0 2
cfn=(190)
calls=1 0
0 14
0 2
cfn=(294) SYSTEM_BASICEVENTRESETEVENT$POINTER
calls=1 0
0 14
0 2
cfn=(210)
calls=1 0
0 10
0 4
cfn=(298)
calls=1 0
0 8
0 4
cfn=(300) SYSTEM_READBARRIER
calls=1 0
0 2
0 5
fn=(294)
0 4
cfn=(296) SYSTEM_NOBASICEVENTRESETEVENT$POINTER
calls=1 0
0 8
0 2
fn=(310)
0 24
cfn=(312)
calls=2 0
0 2
0 4
cfn=(302)
calls=2 0
0 46
0 8
cfn=(142)
calls=2 0
0 48
0 4
cfn=(144)
calls=2 0
0 24
0 12
cfn=(309)
calls=2 0
0 818
0 6
cfn=(324)
calls=2 0
0 34
0 2
cfn=(148)
calls=2 0
0 34
0 4
cfn=(304)
calls=2 0
0 38
0 6
cfn=(330)
calls=2 0
0 28
0 26
cfn=(326)
calls=2 0
0 258
0 4
fn=(314)
0 36
cfn=(312)
calls=3 0
0 3
0 21
cfn=(316) CLASSES_TLIST_$__CLEAR
calls=3 0
0 146
0 6
cfn=(318)
calls=3 0
0 763
0 9
cfn=(324)
calls=3 0
0 51
0 24
cfn=(326)
calls=3 0
0 387
0 12
fn=(322)
0 18
cfn=(372) CLASSES_TFPLIST_$__SETCOUNT$LONGINT
calls=1 0
0 19
0 3
cfn=(224) CLASSES_TFPLIST_$__SETCAPACITY$LONGINT
calls=1 0
0 131
0 10
fn=(324)
0 108
cfn=(312)
calls=3 0
0 3
0 69
cfn=(384)
calls=2 0
0 416
cfn=(326)
calls=1 0
0 129
0 48
fn=(352) SYSUTILS_TMULTIREADEXCLUSIVEWRITESYNCHRONIZER_$__DESTROY
0 12
cfn=(354)
calls=1 0
0 6
0 3
cfn=(194)
calls=1 0
0 7
0 2
cfn=(330)
calls=1 0
0 14
0 2
cfn=(356)
calls=1 0
0 14
0 2
cfn=(360) SYSTEM_BASICEVENTDESTROY$POINTER
calls=1 0
0 14
0 8
cfn=(326)
calls=1 0
0 136
0 4
fn=(360)
0 4
cfn=(362) SYSTEM_NOBASICEVENTDESTROY$POINTER
calls=1 0
0 8
0 2
fn=(364) CLASSES_TLIST_$__GET$LONGINT$$POINTER
0 3
cfn=(366)
calls=1 0
0 19
0 2
fn=(372)
0 19
fn=(390)
0 32
fn=(412)
0 48
cfn=(396)
calls=4 0
0 20402
0 29
fn=(24) SYSTEM_INSTALLDEFAULTSIGNALHANDLER$LONGINT$SIGACTIONREC
0 36
cfn=(16)
calls=4 0
0 164
0 28
cfn=(26)
calls=4 0
0 136
0 16
fn=(28)
0 52
fn=(48)
0 8
cfn=(50) SYSTEM_FPREADLINK$PCHAR$PCHAR$QWORD$$LONGINT
calls=1 0
0 20
0 11
fn=(100)
0 3138
fn=(112)
0 245
cfn=(114)
calls=5 0
0 320
0 42276
fn=(124)
0 4
cfn=(84)
calls=1 0
0 10
0 2
fn=(152)
0 55295
cfn=(248)
calls=3003 0
0 30030
0 18018
cfn=(268)
calls=2002 0
0 168168
0 19003
fn=(222) CLASSES_TFPLIST_$__EXPAND$$TFPLIST
0 22
cfn=(224)
calls=1 0
0 142
0 6
fn=(224)
0 36
cfn=(102)
calls=2 0
0 227
0 10
fn=(236)
0 11011
cfn=(142)
calls=1001 0
0 24024
0 2002
cfn=(144)
calls=1001 0
0 12012
0 8008
cfn=(238) fpc_shortstr_sint
calls=1001 0
0 266589
0 2002
cfn=(152)
calls=1001 0
0 9009
0 4004
cfn=(242) fpc_shortstr_to_ansistr
calls=1001 0
0 191623
0 2002
cfn=(150)
calls=1001 0
0 21021
0 3003
cfn=(152)
calls=1001 0
0 9009
0 3003
cfn=(148)
calls=1001 0
0 17017
0 2002
cfn=(152)
calls=1001 0
0 27027
0 7007
fn=(238)
0 10010
cfn=(240)
calls=1001 0
0 248571
0 8008
fn=(258)
0 54054
cfn=(252)
calls=2002 0
0 110110
0 12012
cfn=(260)
calls=2002 0
0 176176
0 8008
fn=(278)
0 2
cfn=(280)
calls=1 0
0 60224
0 1
cfn=(414)
calls=1 0
0 4
fn=(292)
0 16
cfn=(170)
calls=4 0
0 32
0 8
fn=(300)
0 2
fn=(316)
0 20
cfn=(216)
calls=1 0
0 3
0 5
cfn=(368) CLASSES_TLIST_$__DELETE$LONGINT
calls=1 0
0 93
0 25
fn=(334)
0 20
fn=(342)
0 88
cfn=(396)
calls=1 0
0 17451
0 37
fn=(348) SYSTEM_TINTERFACEDOBJECT_$___RELEASE$$LONGINT
0 6
cfn=(350) SYSTEM_INTERLOCKEDDECREMENT$LONGINT$$LONGINT
calls=1 0
0 10
0 8
cfn=(352)
calls=1 0
0 224
0 5
fn=(408)
0 17
cfn=(410)
calls=1 0
0 29
0 16
cfn=(410)
calls=1 0
0 29
0 16
cfn=(410)
calls=1 0
0 29
0 16
cfn=(410)
calls=1 0
0 29
0 2
fn=(22)
0 4
cfn=(24)
calls=1 0
0 95
0 3
cfn=(24)
calls=1 0
0 95
0 3
cfn=(24)
calls=1 0
0 95
0 3
cfn=(24)
calls=1 0
0 95
0 2
fn=(50)
0 6
cfn=(46)
calls=1 0
0 12
0 2
fn=(52)
0 9
cfn=(54) SYSTEM_SETNOTHREADMANAGER
calls=1 0
0 177
0 2
fn=(54)
0 115
cfn=(56)
calls=1 0
0 60
0 2
fn=(58)
0 1
fn=(76)
0 4
cfn=(78)
calls=2 0
0 40
0 4
fn=(90)
0 6
cfn=(70)
calls=1 0
0 73
0 5
cfn=(72)
calls=1 0
0 62
0 2
cfn=(92) BASEUNIX_FPGETENV$PCHAR$$PCHAR
calls=1 0
0 1659
0 2
fn=(102)
0 28
cfn=(104)
calls=7 0
0 36956
0 14
fn=(134)
0 12
cfn=(136)
calls=1 0
0 446
0 10
cfn=(136)
calls=1 0
0 446
0 15
fn=(160)
0 1385
cfn=(40)
calls=1 0
0 48
0 1383
cfn=(40)
calls=1 0
0 48
0 2
fn=(168)
0 20
cfn=(170)
calls=5 0
0 40
0 10
fn=(206)
0 2
cfn=(208)
calls=1 0
0 15
fn=(220)
0 18
cfn=(222)
calls=1 0
0 170
0 15
fn=(286)
0 11
cfn=(288)
calls=1 0
0 88
0 3
cfn=(302)
calls=1 0
0 23
0 5
cfn=(142)
calls=1 0
0 24
0 2
cfn=(144)
calls=1 0
0 12
0 5
cfn=(216)
calls=1 0
0 3
0 7
cfn=(148)
calls=1 0
0 17
0 3
cfn=(304)
calls=1 0
0 19
0 6
cfn=(308)
calls=1 0
0 726
0 3
cfn=(308)
calls=1 0
0 726
0 3
cfn=(308)
calls=1 0
0 392
0 3
cfn=(344)
calls=1 0
0 9
0 2
cfn=(330)
calls=1 0
0 14
0 8
cfn=(308)
calls=1 0
0 7
0 3
cfn=(308)
calls=1 0
0 7
0 2
cfn=(318)
calls=1 0
0 14
0 2
cfn=(212)
calls=1 0
0 268
0 9
cfn=(216)
calls=1 0
0 3
0 12
cfn=(364)
calls=1 0
0 24
0 2
cfn=(308)
calls=1 0
0 165
0 5
cfn=(308)
calls=1 0
0 673
0 5
cfn=(308)
calls=1 0
0 7
0 4
cfn=(330)
calls=1 0
0 14
0 3
cfn=(356)
calls=1 0
0 14
0 3
cfn=(356)
calls=1 0
0 14
0 4
fn=(296)
0 8
fn=(338)
0 11
cfn=(324)
calls=1 0
0 17
0 9
fn=(362)
0 8
fn=(368)
0 9
cfn=(366)
calls=1 0
0 19
0 4
cfn=(370)
calls=1 0
0 48
0 7
cfn=(226)
calls=1 0
0 1
0 5
fn=(376)
0 4
cfn=(340)
calls=1 0
0 143
0 2
cfn=(152)
calls=1 0
0 14
0 4
fn=(380)
0 192
fn=(8)
0 44
fn=(38)
0 45
cfn=(16)
calls=5 0
0 830
0 85
cfn=(40)
calls=5 0
0 70
0 20
fn=(40)
0 197874
fn=(42)
0 16
cfn=(44)
calls=4 0
0 80
0 20
fn=(70)
0 72
cfn=(40)
calls=4 0
0 189
0 36
fn=(82)
0 10
cfn=(84)
calls=2 0
0 20
0 4
fn=(92)
0 1659
fn=(98)
0 12
cfn=(76)
calls=1 0
0 24
0 2
fn=(128)
0 19
cfn=(130)
calls=1 0
0 515
0 159
fn=(138)
0 91
cfn=(140)
calls=13 0
0 7965
0 91
cfn=(16)
calls=13 0
0 473
0 68
cfn=(188)
calls=1 0
0 63
0 65
fn=(140)
0 14105
cfn=(106)
calls=2015 0
0 181998
0 8060
fn=(148)
0 17578
fn=(182)
0 39
cfn=(138)
calls=3 0
0 459
0 24
cfn=(142)
calls=3 0
0 72
0 6
cfn=(144)
calls=3 0
0 36
0 21
cfn=(142)
calls=3 0
0 72
0 6
cfn=(144)
calls=3 0
0 36
0 18
cfn=(146)
calls=3 0
0 270
0 9
cfn=(146)
calls=3 0
0 768
0 6
cfn=(148)
calls=3 0
0 51
0 39
cfn=(154)
calls=3 0
0 3
0 3
cfn=(148)
calls=3 0
0 51
0 24
fn=(242)
0 9009
cfn=(244)
calls=1001 0
0 135137
0 8008
cfn=(40)
calls=1001 0
0 35465
0 4004
fn=(246)
0 8008
fn=(260)
0 26050
cfn=(262)
calls=2002 0
0 134134
0 16024
fn=(270)
0 60616
cfn=(272)
calls=2020 0
0 98406
0 16167
fn=(346)
0 2
cfn=(348)
calls=1 0
0 253
fn=(350)
0 10
fn=(374)
0 168
cfn=(341)
calls=6 0
0 204
0 280
cfn=(341)
calls=40 0
0 1360
0 134
fn=(398)
0 37591
fn=(404)
0 2
cfn=(406)
calls=1 0
0 14370
0 2
totals: 2320476
More information about the fpc-devel
mailing list