Hi!

I have a simple one-line patch to enable the use of multiple CPUs or
cores when building with MSVC. It is only inside the C compiler
itself, but it makes about a 30-35% reduction in compile time on a
fairly CPU-limited dual-CPU VM. It would probably do a lot more on for
example a quadcore. It pushes the CPU to 100% when building the larger
projects like postgres.exe and psql.exe, but obviously stays a lot
lower for building all the small single-file projects, since it's only
the C compiler that uses it.

I can measure no performance decrease on single-core CPUs. Probably
because the switch makes the compiler figure out how many CPUs that
are available...

Since we only support one compiler (Visual Studio 2005) for this, I
see the risk of this as very low. The only downside is if you use this
on a development machine, it will use up all your CPU whereas
previously it used only one core. I haven't even seen normal
operations on the machine slow down thouhg...

I'm going to apply this for HEAD. I'm considering backpatching as
well, to speed up all build machines. Comments on that?

-- 
 Magnus Hagander
 Self: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to