[Bug c/93278] huge almost empty array takes huge time to compile and produces huge object file
amonakov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 18 08:43:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93278
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #8 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
(Jakub - the assembler could emit a file with holes by lseek()'ing over zeroed
areas instead of write()'ing literal zeroes to the file)
I see the bug is closed, but for the sake of adding some clarity:
if bin/gcc by default produces a file named "a.exe", that suggests you're on
Windows. There's a good reason why you're asked to show output of 'gcc -v' (not
'gcc --version'!): it has configuration info including compiler host system.
If you're really on Windows the slowness is probably explained by
Windows-specific I/O overheads, e.g. an antivirus intercepting and blocking
writes. Your timing info amounts to 1 millisecond per 4KB chunk of output. On
Linux the assembler needs 0.007 seconds on my machine, amounting to
microseconds per 4KB chunk.
More information about the Gcc-bugs
mailing list