News:

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

Main Menu

String cat benchmark in PowerBASIC

Started by hutch--, April 29, 2018, 02:29:39 PM

Previous topic - Next topic

hutch--

To avoid the trolling by MCM in the PowerBASIC forum, I have posted the zip file here. It is the exact algorithm used in the 32 bit MASM version and loads a file that is 480 meg and sequentially appends it to allocated memory which is then written back to disk. The algo also uses a version of FASTCALL and it is called by a macro as it is a non standard calling method.

jj2007

Interesting notation ;)
    prefix "!"

    push esi
    push edi

hutch--

It came with the last versions before Bob Zale passed away, I always hated the line by line escapes and the block escapes solve that problem. The FASTPROC notation is effectively identical to MASM's no stack frame notation so I can swap code between 32 bit MASM and PB very easily, minor differences in the HEX notation, PB uses &H11223344 where MASM uses 11223344h but its easy enough to translate.

I have 20 years of 32 bit assembler written in PB and much of it ports easily to either 32 or 64 bit code. In 64 bit it is little more than changing register sizes so it means I have not wasted years of code.

bobl

This is invaluable to me. The Prolog guys are of the belief that if you're using strings (instead of numbers :) ) you're doing something wrong. I must be doing something very wrong because virtually all of my programs are string manipulating programs (admittedly as bytes or dwords when I can) and this mostly means appending or splitting the things. I'm always mindful that the same probably represents a bottle neck so thank you for your code, alleviating it.