5 ms·
Have you tried taking a look at UPX for the binary size? I found that it significantly decreased the size of the binary to the point where the problem was more
by 0x500x79 4y ago
Have you tried taking a look at UPX for the binary size? I found that it significantly decreased the size of the binary to the point where the problem was more the size of my dependencies (large JARs that could not be optimized away) and could get the binary to a completely manageable place. They aren't C small, but they were definitely better than traditional Java apps by an order of magnitude.
- eatonphil 4y agoUPX doesn't play nice with antivirus software if it's important for you to run on Windows (at least). https://github.com/upx/upx/issues/337 https://github.com/upx/upx/issues/337
- zorr 4y agoI had not heard of UPX until just now and just did a quick test. With `-7` level it brings the 10MB binary down to 3.6MB but execution time was roughly x10.
- 0x500x79 4y agoI haven't touched this in a long-while, but I believe startup will be impacted but post startup the impact should be smaller once the binary has been loaded. It depends on how your executable is used of course, but a hello world application will show the worst performance degredation since the code is loaded then executed once.
- ComradePhil 4y agoUPX used to be great when reading from disk took way too long... and having small binaries to read from disk and unpacking in memory was faster... but now in the age of SSDs, I don't know how much sense it makes to compress binaries. Back in the day, I used to use UPX on most apps, which would greatly improve launch times.
- coldtea 4y agoExecution time should hardly be affected in any measurable way, except for trivial scripts.