The MASM Forum

Projects => Rarely Used Projects => PowerBASIC => Topic started by: hutch-- on April 29, 2018, 02:29:39 PM

Title: String cat benchmark in PowerBASIC
Post by: hutch-- on April 29, 2018, 02:29:39 PM
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.
Title: Re: String cat benchmark in PowerBASIC
Post by: jj2007 on April 29, 2018, 04:12:06 PM
Interesting notation ;)
Code: [Select]
    prefix "!"

    push esi
    push edi
Title: Re: String cat benchmark in PowerBASIC
Post by: hutch-- on April 29, 2018, 04:28:14 PM
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.
Title: Re: String cat benchmark in PowerBASIC
Post by: bobl on April 29, 2018, 08:29:00 PM
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.