3 ms·
From here: https://github.com/jart/cosmopolitan/releases/tag/3.5.0 https://github.com/jart/cosmopolitan/releases/tag/3.5.0 Justine wrote: > We've made a l
by throwaway2037 2y ago
From here: https://github.com/jart/cosmopolitan/releases/tag/3.5.0 https://github.com/jart/cosmopolitan/releases/tag/3.5.0
Justine wrote:
> We've made a lot of progress reinventing the C++ STL.
What is the motivation behind this? Try to reduce (compiled) binary size? Naively, I am surprised that the C++ STL from Clang isn't OK to use, including the license. Or is this a clean room impl thing?
EDIT
To be clear: I mean no disrespect with this question. This is an amazing project.
EDIT 2
Ok, I just spotted this commit message:
https://github.com/jart/cosmopolitan/commit/c4c812c15445f5c3df6b1f4a426f8ee89d3d20ac https://github.com/jart/cosmopolitan/commit/c4c812c15445f5c3...
> We now have a C++ red-black tree implementation that implements standard
template library compatible APIs while compiling 10x faster than libcxx.
Can someone explain to an average C++ programmer like me how they make it compile 10x faster !?
- simjnd 2y agoThe rationale is explained in this README [1], but it basically boils down to transitive dependencies and the amount of checks the compiler has to do. From linked README: "If we `#include <string>` for the LLVM libcxx header containing the `std::string` class, then the compiler needs to consider 4,800 `#include` lines. Most of them are edges it'll discount since they've already been included but the sum total of files that get included is 694!" [1]: https://github.com/jart/cosmopolitan/blob/master/ctl/README.md https://github.com/jart/cosmopolitan/blob/master/ctl/README....