3 ms·
There are a few problems with STL when writing kernel or API code. One is due to it's completely generalized nature. Since it's not heavily optimized for eith
by cube13 15y ago
There are a few problems with STL when writing kernel or API code.
One is due to it's completely generalized nature. Since it's not heavily optimized for either speed or memory use, it tends to perform rather poorly in both areas. Not that acceptable when you're making kernel code, where it's often better to write optimized data structures for the problem at hand rather than just relying on templated code. In that situation, where performance is king, you want to tailor your data structures to fix your problems, rather than the other way around.
STLPort and Boost fare better in this respect, but STLPort in particular leads to the second problem.
The second problem is due to the std namespace. Using the std namespace means things that link in your code, even dynamically, cannot necessarily use other STL implementations. So if the kernel uses STLPort, that means that every other program written on top of the kernel needs to use it.
- wmf 15y agoSo if the kernel uses STLPort, that means that every other program written on top of the kernel needs to use it. The Linux module API/ABI has worse problems than that already.
- neohaven 15y agoOh sure, "We have problem A, let's add problem B, while solving nothing." Please explain to me how this would fix anything? ;)