3 ms·
> As an intern at a data science company, I noticed that a certain closed-source shared library we were using was calling the same trigonometric functions with
by TomSwirly 6y ago
> As an intern at a data science company, I noticed that a certain closed-source shared library we were using was calling the same trigonometric functions with the same arguments over and again. So, I tried to use LD_PRELOAD to "monkey-patch" libm with caching and that reduced the running time of the data pipeline by 90%.
This is a very edgy edge case, though.
> How much disk space would linux userland require if every binary was to be statically linked?
Megabytes more?
I have never been on a project or a machine since the 70s where executables took a majority of the disk space. On this disk, about 15% of it is executables, and I have a lot of crap in my executable directory and just deleted a lot of junk data.
Also, no one's seriously proposing that core libraries that everyone uses be statically linked.
- alex_smart 6y ago>Megabytes more? Megabytes more in total, or megabytes more per binary? > On this disk, about 15% of it is executables, and I have a lot of crap in my executable directory and just deleted a lot of junk data. Is there any study on how this might change if we moved from dlls to statically linking everything? > no one's seriously proposing that core libraries that everyone uses be statically linked If we agree that shared libraries are fine for the common case, and there are n number of existing solutions for distributing applications with tricky dependencies, what are we even talking about in this thread? :\
- gpm 6y ago> Is there any study on how this might change if we moved from dlls to statically linking everything? Drew Devault did an informal one https://drewdevault.com/dynlib.html https://drewdevault.com/dynlib.html TL;DR - not at all substantially.