flat assembler
Message board for the users of flat assembler.
Index
> Windows > lstrcat replacement Goto page Previous 1, 2 |
Author |
|
marcinzabrze12 09 Dec 2012, 17:15
other hand. I used now DLL version of library STRING.INC and wrote code to display clock counter like this:
Code: format pe gui 4.0 entry start include 'win32ax.inc' section '.code' code readable writeable executable stringa db 'JakiStam LaNCUCH ZnakOw', 0 stringb db 'JakiStam LaNCUCH ZnakOw', 0 timer1: dq ? timer2: dq ? txbuffer: db 400h dup 0 start: invoke QueryPerformanceCounter, timer1 ; --------------------------------------- invoke lstrcmp, stringa, stringb ;/ invoke ansiCmp, stringa, stringb ; --------------------------------------- invoke QueryPerformanceCounter, timer2 ; --------------------------------------- mov eax, [timer1] mov ebx, [timer2] sub ebx, eax cinvoke wsprintf, txbuffer, <'TIME: %0.8d',13,10>, EBX invoke MessageBox, 0, txbuffer, 'result:', 0 ; --------------------------------------- ret section '.idata' import data readable library kernel32, 'kernel32', user32, 'user32', string, 'NOAPI_STRING.DLL' include 'api\kernel32.inc' include 'api\user32.inc' import string,\ ansiLength, 'ansiLength',\ unicodeLength, 'unicodeLength',\ ansiCopy, 'ansiCopy',\ unicodeCopy, 'unicodeCopy',\ ansiCat, 'ansiCat',\ unicodeCat, 'unicodeCat',\ ansiCmp, 'ansiCmp',\ ansiCmpx, 'ansiCmpx',\ unicodeCmp, 'unicodeCmp',\ unicodeCmpx, 'unicodeCmpx',\ ansiToBig, 'ansiToBig',\ ansiToSmall, 'ansiToSmall',\ unicodeToBig, 'unicodeToBig',\ unicodeToSmall, 'unicodeToSmall',\ unicodeToAnsi, 'unicodeToAnsi',\ ansiToUnicode, 'ansiToUnicode' Its shows that lstrcmp is about 100x slower than ansiCmp. Or may be i wrong way test time execution ? EDIT: i uploaded dll version of STRING.INC file if someone want to test it:
|
|||||||||||
09 Dec 2012, 17:15 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.