[Gambas-user] Faster compiler

Brian G brian at westwoodsvcs.com
Sun Jan 31 19:32:04 CET 2021


on linux use nproc return number of processors ie. cores and virtual cores

bsd use as root dmesg | grep -i cpu

Thank You
Brian G

----- Original Message -----
From: "Benoît Minisini" <g4mba5 at gmail.com>
To: "Gambas mailing list" <user at lists.gambas-basic.org>
Sent: Sunday, January 31, 2021 5:12:48 PM
Subject: Re: [Gambas-user] Faster compiler

Le 31/01/2021 à 16:50, Bruce Steers a écrit :
> Do you think it is worth adding to the makefile.am <http://makefile.am> 
> files in app comp and main?
> I'm testing it, I've added '-j 4' to my makefiles gbc3 commands.
> Is it the sort of thing that would work worse on a single core processor 
> so best not to provide a default setting?

I tried with a '-j4' added in the Makefile.am. Of course it speeds up 
the compilation of all components written in Gambas, but as it's not a 
big part of the full process, the global time gain is small.

Anyway, if I want to use that new option, it must be a global configure 
paramater, as AFAIK there is no standard way of knowing the number of 
available cores on Unix (Linux + *BSD + ...).

Regards,

-- 
Benoît Minisini

----[ http://gambaswiki.org/wiki/doc/netiquette ]----


More information about the User mailing list