[SR-2519] Swift binary can be significantly larger than the source code #45124
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
IRGen
LLVM IR generation
performance
SILGen
Area → compiler: The SIL generation stage
Attachment: Download
Environment
Apple Swift version 3.0 (swiftlang-800.0.43.6 clang-800.0.38)
Additional Detail from JIRA
md5: 8783b1f41b2388e7b855c162ac5af4b6
Issue Description:
In my exploration to profile what structure (class, struct, enum) is most efficient as a static function container with regards to both compilation time and binary size, I came upon something that I find quite puzzling.
I generated a ~1M Swift file, however, the compiled binary for this file is ~7.9M (running swiftc class.swift -o class). I attached my generated class.swift file.
The text was updated successfully, but these errors were encountered: