5 ms·
Notice the dates on these papers though. 2005 and 2007 are a long time ago in C++ compiler land. I'm using the STL in very low latency DSP code with zero proble
by cageface 15y ago
Notice the dates on these papers though. 2005 and 2007 are a long time ago in C++ compiler land. I'm using the STL in very low latency DSP code with zero problems. You have to make sure you don't allocate memory in realtime callbacks but that's just as true of malloc.
- acqq 15y agoDates are irrelevant if you really want to control where something gets allocated. Last time I've checked there weren't the level of control described in the linked articles in "standard" C++. If you know how I can achieve it, please write, but please don't dismiss my need with "you wouldn't notice everything is fast enough it's 2012."
- deleted 15y ago[deleted]
- cageface 15y agoCan you name any language that does give you that level of control in its standard collection classes? At least C++ gives you the power to define your own if you really need to.
- acqq 15y ago"C++ gives you the power" exactly because there's full C underneath -- once you avoid "standard" containers, "OOP," "STL," "boost" and "best C++ practices" you can still malloc and place structs where you want. Sometimes you really need that level of control, and you get it from C. AFAIK, Google's Go simply just says "we don't give you that level of control." That's why C won't be fully replaced with Go. And that's also what "omg I need C++" people don't understand. I don't blame them for not knowing, they didn't have to work on such problems. But I blame them when they insist that what they do is enough for everybody. It isn't.
- Zardoz84 15y agoD give you the same control that C, and same time you have a lot of funny things that have other high level languages at same time that is'nt a kraken like c++
- lallysingh 15y agoIn standard-land, not so long ago. The process is slow. As for the Lakos allocator model, two issues come up: (1) You get an allocator pointer in everything. (2) Each allocator still doesn't get to be simple: if the container passes the allocator down to its elements, the allocator has to worry about very differently-sized allocations. E.g. rb-tree nodes and the contained types.