Author Topic: String cat benchmark in PowerBASIC  (Read 4037 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 10583
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
String cat benchmark in PowerBASIC
« 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

jj2007

  • Member
  • *****
  • Posts: 13932
  • Assembly is fun ;-)
    • MasmBasic
Re: String cat benchmark in PowerBASIC
« Reply #1 on: April 29, 2018, 04:12:06 PM »
Interesting notation ;)
Code: [Select]
    prefix "!"

    push esi
    push edi

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 10583
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: String cat benchmark in PowerBASIC
« Reply #2 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

bobl

  • Member
  • **
  • Posts: 72
Re: String cat benchmark in PowerBASIC
« Reply #3 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.