Menu

Compile/assemble speed differences

Help
2020-01-21
2020-01-21
  • Jack Hoffnung

    Jack Hoffnung - 2020-01-21

    Results of using HEX button on IDE to generate .hex file of code I am working on - 44 seconds.
    Results of using ASM button on IDE, then using MPASMWIN.exe to get .hex file - Total <5 seconds.
    Does anyone know why this would be so?
    (Using current GCB version 98.06, MPASMWIN.EXE v5.47)

     
  • Jim giordano

    Jim giordano - 2020-01-21

    Using your stayopen option, it looks like all the extra time is in the preprocessor. No idea what it is doing for that long. I've often had the same question, but was never high enough on my list to bug anyone. Maybe we'll get some answers.

    Edit: okay, I cleaned up this mess a bit.

    The delay is caused by a section of code in the MakeHex.bat file.
    There is a section of code that checks to see if any changes have been made to any of the standard include files. If so, they are checked for validity. The check was taking too long, see my post below for the old method, and the new methods that will be released soon.

     

    Last edit: Jim giordano 2020-01-21
  • Anobium

    Anobium - 2020-01-21

    Jim and I got on a conf call today.

    I will let Jim explain... it was his idea!

    Faster - a lot faster!!

     
  • Jim giordano

    Jim giordano - 2020-01-21

    The difference in time between the two methods-
    old method: 7+ seconds
    new method: 2.4 seconds
    This may not seem like much, but when you are just sitting there waiting, it's quite a bit.

    This process of checking to see if any changes have been made to any of the standard include files, and checking for errors if there has been changes, is something that should be done, so we worked on it.

    This check was only being done if you selected the option to make a hex file. Not "make asm", and not "hex and flash". It should be done for all of them.

    The previous process consisted of doing an attrib on each file and piping the result through findstr thus:

    for /R include\ %%F in (*.%FileType%) do (
        attrib "%%F" | findstr /B "A"  > nul
      if errorlevel 1 (
      rem do nothing - move onto next action.
      ) ELSE (
      check the file here using gawk
    attrib "%%F" -A
      )
    

    the line attrib "%%F" | findstr /B "A" > nul
    was the culpret.

    We change the process to:

    dir include\*.h /b /s /aa > filesofinterest.txt
    if not exist filesofinterest.txt goto CurrentFile
    for /F %%i in (filesofinterest.txt) do (
        check the file here using gawk
        attrib "%%i" -A
    )
    

    The dir include*.h /b /s /aa
    runs in a fraction of a second, giving us all the files that have changed, rather than the 4-6 seconds for the attrib "%%F" | findstr /B "A".

    If we do no test at all, it takes about 2.3 seconds, so the difference is .1 sec vs. 4 sec, so about 40 times faster :)

     

    Last edit: Jim giordano 2020-01-21

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.