chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows vs Linux Performance, windows host 4-6x slower than linux gu


From: Peter Bex
Subject: Re: Windows vs Linux Performance, windows host 4-6x slower than linux guest vm
Date: Thu, 9 Sep 2021 14:21:12 +0200

On Mon, Sep 06, 2021 at 01:26:26PM +0100, Mark Fisher wrote:
> 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.

hm, that's odd indeed.  Perhaps it's something to do with the different C
calling conventions the two OSes use?

I remembered that we used to define C_fcall as __fastcall under Windows
with MSVC back when we still supported it.  That's when x86 was still
very common.  It looks like Mingw also supports it nowadays (or maybe it
always has?)

See also https://docs.microsoft.com/en-us/cpp/cpp/fastcall?view=msvc-160
I don't know if it makes a big difference - that page says it's ignored
by compilers targeting arm or x64 architecture, so maybe it won't buy you
anything.

But if you feel like trying it out, you can add something like the
following to the top of chicken.h (or chicken-config.h):

#define C_fcall __fastcall

and then recompile CHICKEN itself and your code, and see if that makes
a noticable difference.

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]