Menu

GreatCowBASIC Wine vs. Linux

bed
2017-12-23
2018-01-02
  • bed

    bed - 2017-12-23

    This article is a comparison of two options for Linux users.
    I was interested in how far the compilers of gcbasic differ between Wine and native Linux. With wineconsole a tool is available to call Windows programs that have a commadline interface directly without using the detour via the Windows GUI.

    So I'm calling
    time wineconsole --backend=curses exit

    I get an execution time of

    wineconsole: 
    real 0m0,223s 
    user 0m0,024s 
    sys 0m0,024s
    

    This is therefore the overhead of the wine system and must be taken into account in the result of the investigation.

    The small demo program 040_Rotate_the_LEDS. gcb, which is used for the board StartPic18 in the demo folder, serves as a non-representative base.

    time wineconsole --backend=curses GreatCowBasic/gcbasic.exe 040_Rotate_the_LEDS. gcb 
    real 0m2,182s 
    user 0m0,032s 
    sys 0m0,040s
    

    Native Compiler:

    time gcbasic 040_Rotate_the_LEDS.gcb 
    real 0m0,430s 
    user 0m0,368s 
    sys 0m0,020s
    

    After deducting the overhead, compiling a small basic program with wine takes almost exactly 2 seconds. Compiling with the native Basic Compiler under Linux takes less than 0.5 seconds.

    The native Linux version of the compiler is 4 times faster.

    For those who are not so proficient with Linux:
    The Time command measures three times,
    The measured time required by the measured command is real.
    User is the time consumed in normal routines and Sys, the time consumed in privileged kernel routines. These are mainly file system accesses.
    Because Linux is a multitask and multi-user system, it is quite interesting to pay attention to the difference between Real and Sys, if there are other activities in the background, the difference between Real used time and the user time is of course much bigger than if you are sitting alone at the computer and work in single user mode.

     

    Last edit: bed 2017-12-23
  • stan cartwright

    stan cartwright - 2017-12-23

    Out of interest I wanted to try installing GCB on a raspberry pi but I can't understand linux...harder than dos. I can't imagine why I would use a rpi for gcb. I got fb to work so I can program the thing when I find where my files are.

     
    • bed

      bed - 2017-12-23

      Understanding why you want use a Raspberry for GCB I don't understand either.
      For me Linux is the perfect System. The Hardware must be powerfull, of course. So I try to do everything beside cooking coffee with it.
      An I'm surprised that the wineconsole is so lame. Thats it.

       
  • stan cartwright

    stan cartwright - 2017-12-24

    I tried ubuntu and installed wine not knowing what it was, it was in a list of things you install like geany and vlcplayer .... and. Anyway, I had it dual boot windows grub and windows game called gltron in win dir but ran in wine like in win...and old dos games like duke nukem.
    With all the different versions/gui's I've tried I still need to use the terminal for "compiling" files which is alien to me ie compiling files. apt-get make yawn later sorry

     
    • bed

      bed - 2017-12-24

      I love the Commandline, more powerfull than GUI :-)
      I am Unix affine since Amiga and the Public Domain series Fred Fish.
      Most of this things were unix. Stay for Windows and be happy :-)
      Btw: your last Video R2D2 Sound and Eyes is really awesome!!

       
  • bed

    bed - 2018-01-02

    Just another try from me.
    Installed Virtual Box,Version 5.2.4 r119785 and Windows Prof. 64 Bit, Great Cow BASIC 0.98.01
    Done same Speed test as last. Results:


    Test with the "Evan GLCD_Touch_Simple_Demonstration_ATmega2560_SSD1289.gcb" Speedtest 12 Seconds.

    Make HEX, so the Time is usefull as a primitive Benchmark

    System Source Time
    wine Evan GLCD_Touch_Simple 79 Seconds
    wineconsole Evan GLCD_Touch_Simple 72 Seconds
    VM Windows Evan GLCD_Touch_Simple 12 Seconds
    Native Linux Evan GLCD_Touch_Simple 6 Seconds

    My Conclusion.
    As Linux User with Command line Experience there is no way around native Linux GCB.
    Who is more comfortable with GUI, do yourself a favour and use a full blown Windows Installation in a VM Box.
    The only caveat is, you must take care to handle the USB Bridge for the VM. I did not investigate this.

     

Log in to post a comment.