Is code compilation demanding?

I'd like to know how demanding is it to compile a simple command prompt based C++ program using gcc or g++.

What is the absolute worst machine, that could do this?

Also, are there any system requirements for code compilation (gcc/g++) or does it depend on the code?
Well, you type
g++ hello.cpp
into a Windows cmd window or linux shell. How demanding would you like it to be?

It saves loading the Visual Studio bloatware.



What is the absolute worst machine, that could do this?

My 'phone.
Last edited on
What is the absolute worst machine, that could do this?

The resources consumed by the compiler alone depends on the code being compiled -- typically, the amount of memory is the constraining factor.

Software can be cross-compiled - compiled on one machine for another.
C++ was compiled already last millenia with "regular" hardware of the day. Even the phones of today have more oomph.
it isnt linear.
the larger the program, the more resources it takes, because the compiler will attempt to optimize across wide boundaries and that takes a great deal of resources for a big code base.

that said,
compiling a small program with g++ is not very demanding.
it can be done on little more than a simple wristwatch. It may take hours there, instead of nanoseconds on a real computer, but it can DO it. There are bored people out there who spend their free time putting unix onto oddball devices. You can google this. Any of these devices that are running the OS can compile a small program with g++.

it depends on the code, as I noted above.
Last edited on
So an old Pentium 4 PC should be more than enough, right?
more than. I compiled on a 286 that was like a 10 HZ chip with no floating point support and there are folks older than me here too..
Last edited on
Topic archived. No new replies allowed.