News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Fast QWORD to string in 32-bit code

Started by jj2007, May 02, 2022, 09:11:09 PM

Previous topic - Next topic

jj2007

This is a little spinoff from the qword to unicode thread. I wonder whether to add a fast QWORD to string algo to MasmBasic. Rarely needed, of course, but why shouldn't we beat good ol' CRT by a factor 6.5?  :badgrin:

Timings welcome :thup:

This program was assembled with UAsm64 in 32-bit format.
Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
64      bytes for q2asc
76      bytes for UINT64

3620 ticks for CRT
3572 ticks for CRT
3541 ticks for CRT
    Result=1234567890123456789

546 ticks for x32Q
546 ticks for x32Q
593 ticks for x32Q
    Result=1234567890123456789

468 ticks for x32Q
483 ticks for x32Q
468 ticks for x32Q
    Result=1234567890

110 ticks for q2asc
109 ticks for q2asc
125 ticks for q2asc
    Result=1234567890

343 ticks for Baseform (bitRAKE)
312 ticks for Baseform (bitRAKE)
328 ticks for Baseform (bitRAKE)
    Result=1234567890


P.S.: No source right now, but holding Shift you can trigger an int 3 :cool:

LiaoMi

This program was assembled with UAsm64 in 32-bit format.
11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
64      bytes for q2asc
76      bytes for UINT64

1937 ticks for CRT
1891 ticks for CRT
1968 ticks for CRT
    Result=1234567890123456789

500 ticks for x32Q
485 ticks for x32Q
500 ticks for x32Q
    Result=1234567890123456789

437 ticks for x32Q
453 ticks for x32Q
438 ticks for x32Q
    Result=1234567890

62 ticks for q2asc
47 ticks for q2asc
47 ticks for q2asc
    Result=1234567890

78 ticks for Baseform (bitRAKE)
78 ticks for Baseform (bitRAKE)
79 ticks for Baseform (bitRAKE)
    Result=1234567890

--- hit any key ---