3 ms·
As a user I’d prefer faster startup over shaving off a couple MB tbh.
by manmal 4y ago
As a user I’d prefer faster startup over shaving off a couple MB tbh.
- hansvm 4y agoEven if so that takes benchmarking on the target systems. Linking can be fast compared to reading a few extra MB from disk.
- manmal 4y agoWith SSDs approaching 10GB/s reads, I think that’s negligible. Also, chances are high the binary is in RAM for a long time after first use.
- saagarjha 4y agoCalling dlopen is perhaps one of the slowest way to bring in libraries on Darwin.
- mihaip 4y agoWhat would you recommend? dlopen is only used when running in CLI mode (which is not super performance sensitive), but not making it slower than it needs to be would be good too.
- saagarjha 4y agoYou should link against the library directly. dyld’s optimizations are complex, especially when it comes to third party code, but by linking directly the system can cache some of the work.