We on the Rust team got to speak about the lessons learned from the EASTL with Paul Pedriana (the author of much of it) while designing the Rust standard library. It's a significant influence on the proposed allocators API currently in RFC. The EASTL is worth looking at for anyone interested in designing libraries that work well in low-memory environments. (Much of this library was written with devices like the Nintendo DS in mind, which had 4 MB--4 MB!--of RAM as I recall.)
STL is maybe a bit missleading because it doesn't seem like it is a drop-in replacement for the STL.<p>However, this is certainly interesting because the emphasis on speed (and thus also on simplicity) is what I'm sometimes missing in the real STL or in Boost. That's exactly what you need in a game but also in much other performance critical code.<p>As far as I remember, Chrome has used the STL earlier. But I looked now and I see this:
<a href="https://chromium.googlesource.com/chromium/blink/+/master/Source/wtf/" rel="nofollow">https://chromium.googlesource.com/chromium/blink/+/master/So...</a><p>Gecko also seem to have a lot of custom stuff: <a href="https://github.com/mozilla/gecko-dev/tree/master/xpcom/string" rel="nofollow">https://github.com/mozilla/gecko-dev/tree/master/xpcom/strin...</a><p>Doom3 idLib: <a href="https://github.com/id-Software/DOOM-3-BFG/tree/master/neo/idlib" rel="nofollow">https://github.com/id-Software/DOOM-3-BFG/tree/master/neo/id...</a><p>Unreal engine: <a href="https://answers.unrealengine.com/questions/2695/rocket-and-the-stl.html" rel="nofollow">https://answers.unrealengine.com/questions/2695/rocket-and-t...</a><p>You'll find much more similar libs when you search in some of the big games.
Writeup on the key design and advantages of EASTL for their target platforms (game consoles): <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html" rel="nofollow">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n227...</a>
I have worked for game companies making large console games both with the STL and without. One thing I noticed about STL is that it really bloats the build times because the STL headers are so massive. I did some analysis of the preprocessor output one time and found that just including a couple of headers like vector.h and string.h would increase the size of the preprocessor output by 80000 to 100000 lines, even for a cop file that is otherwise trivially small. Typically almost every cpp file in the codebase would either directly use STL headers or bring them in as dependencies, and so in a codebase of a few thousand files you are talking about hundreds of millions of extra lines of code that the compiler has to churn through. This amounted to each cpp file talking several seconds to compile and the entire codebase taking most of an hour to rebuild. People would not have been able to survive that without using Incredibuild to farm off compilation to other machines. The company I currently work at does not use STL and so largely avoids this problem. I an curious to what extent EASTL has this problem or avoids it.
This was open sourced years ago on the EA open source page: <a href="http://j.mp/1Kh4L2C" rel="nofollow">http://j.mp/1Kh4L2C</a><p>It's just on Github now.
A quick reference guide in PDF is available at <a href="https://github.com/electronicarts/EASTL/blob/master/doc/EASTL%20Quick%20Reference.pdf" rel="nofollow">https://github.com/electronicarts/EASTL/blob/master/doc/EAST...</a>. Lists all Algorithms, functions etc.
Cute. It's fun to see game programmer code. This is really C with a little C++. Lots of pointer casts, comments like "The user must provide ample buffer space, preferably 256 chars or more." There's a lot of stuff in there to deal with Microsoft Visual C++'s interpretation of the language, which prior to 2010, was kind of off.<p>Why does "swap" use EASTL/move_help.h? There are things that can go wrong with a move that can't go wrong with a swap. Move is a swap with a constraint that the destination be empty.<p>(Doing things through swapping has its uses. It preserves single ownership, for example.)
Scott Wardle gave an interesting talk at CppCon 2015 which mentions EASTL a bit, with the reasons they use it (and other non-standard tools): “Memory and C++ debugging at Electronic Arts” <a href="https://youtu.be/8KIvWJUYbDA" rel="nofollow">https://youtu.be/8KIvWJUYbDA</a>
Note that EA had already released some of the code in 2010: <a href="https://github.com/paulhodge/EASTL" rel="nofollow">https://github.com/paulhodge/EASTL</a>
I just upvoted the same news just 4 days ago: <a href="https://news.ycombinator.com/item?id=11069305" rel="nofollow">https://news.ycombinator.com/item?id=11069305</a><p>There is some issue with duplicates in HN, I think points should go to the original poster, more if it's recent.