Hi Mark, On Mon, 6 Sep 2021 13:26:26 +0100 Mark Fisher <mark.j.fis...@gmail.com> wrote:
> I've got a windows and linux environment for Chicken on the same machine. > linux is running in VMWare Workstation, the host is Windows 10. > > I'm seeing quite a difference in performance between the two; windows host is > running about ~4-6x slower than a VM that's running on the same machine. > > The code I'm running is some of the 2015 advent of code challenges I'm > writing to learn scheme. > My codebase is: https://github.com/markjfisher/aoc-chicken > > All times below (last 3 columns) are in millis, they show Total time, then > times for the 2 parts that are run to make that total. > > building: > $ cd build; RELEASE=1 make clean all > > On my linux VM > $ ./advent2015 > Day: Part 1 Part 2 Time P1 P2 > 01 : 232 1783 11 6 5 > 02 : 1606483 3842356 62 34 28 > 03 : 2565 2639 97 27 70 > 04 : 254575 1038736 2713 490 2223 > > On my Windows Host >> advent2015.exe > Day: Part 1 Part 2 Time P1 P2 > 01 : 232 1783 63 32 31 > 02 : 1606483 3842356 375 187 188 > 03 : 2565 2639 656 187 469 > 04 : 254575 1038736 10735 2156 8579 > > Both are using 5.3.0rc2, both using "-O3" flags for release mode. All eggs > (listed in the docs/setup.md) were installed with same version of chicken. > gcc is 10.3.0 from chocolatey in windows, and same version in linux. > > Is windows performance a known thing? Is there anything else I can do to make > the windows build more performant? > > - - - 8< - - - > The compilation output for linux: > csc -I ../ -s -d3 -O3 ../advents/2015/aoc2015day01.scm -j aoc2015day01 > -emit-types-file aoc2015day01.types -o aoc2015day01.so > csc -I ../ -s -d0 aoc2015day01.import.scm > csc -I ../ -s -d3 -O3 ../advents/2015/aoc2015day02.scm -j aoc2015day02 > -emit-types-file aoc2015day02.types -o aoc2015day02.so > csc -I ../ -s -d0 aoc2015day02.import.scm > csc -I ../ -s -d3 -O3 ../advents/2015/aoc2015day03.scm -j aoc2015day03 > -emit-types-file aoc2015day03.types -o aoc2015day03.so > csc -I ../ -s -d0 aoc2015day03.import.scm > csc -I ../ -s -d3 -O3 ../advents/2015/aoc2015day04.scm -j aoc2015day04 > -emit-types-file aoc2015day04.types -o aoc2015day04.so > csc -I ../ -s -d0 aoc2015day04.import.scm > csc -I ../ ../advents/2015/advent2015.scm -d3 -O2 -compile-syntax -o > advent2015 > > For windows: > csc -I ..\\ -s -d3 -O3 ..\\advents\\2015\\aoc2015day01.scm -j aoc2015day01 > -emit-types-file aoc2015day01.types -o aoc2015day01.so > csc -I ..\\ -s -d0 aoc2015day01.import.scm > csc -I ..\\ -s -d3 -O3 ..\\advents\\2015\\aoc2015day02.scm -j aoc2015day02 > -emit-types-file aoc2015day02.types -o aoc2015day02.so > csc -I ..\\ -s -d0 aoc2015day02.import.scm > csc -I ..\\ -s -d3 -O3 ..\\advents\\2015\\aoc2015day03.scm -j aoc2015day03 > -emit-types-file aoc2015day03.types -o aoc2015day03.so > csc -I ..\\ -s -d0 aoc2015day03.import.scm > csc -I ..\\ -s -d3 -O3 ..\\advents\\2015\\aoc2015day04.scm -j aoc2015day04 > -emit-types-file aoc2015day04.types -o aoc2015day04.so > csc -I ..\\ -s -d0 aoc2015day04.import.scm > csc -I ..\\ ..\\advents\\2015\\advent2015.scm -d3 -O2 -compile-syntax -o > advent2015 > - - - - Thanks for the detailed information. That performance discrepancy is kinda surprising, specially considering that Linux is running as a guest on a VM on Windows. Maybe profiling can help spot what is causing the performance difference? All the best. Mario -- http://parenteses.org/mario