Live data from Hacker News

Electronic Arts Standard Template Library for C++ Open Sourced

github.com

11–20 of 60 posts

Re: Electronic Arts Standard Template Library for C++ Open Sourced

#11

STL is maybe a bit missleading because it doesn't seem like it is a drop-in replacement for the STL. 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. As far as I remember, Chrome has used the STL earlier. But I looked now…

> As far as I remember, Chrome has used the STL earlier. But I looked now and I see this:

The WTF (Web Template Framework) is actually inherited from WebKit and used in the core rendering engine. I'm not sure how widely it's used in the Google parts of Chromium.

> Gecko also seem to have a lot of custom stuff

That's the old XPCOM stuff. While those string types continue to get a lot of use, the closest analogue to the STL is MFBT: https://github.com/mozilla/gecko-dev/tree/master/mfbt

Re: Electronic Arts Standard Template Library for C++ Open Sourced

#13

STL is maybe a bit missleading because it doesn't seem like it is a drop-in replacement for the STL. 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. As far as I remember, Chrome has used the STL earlier. But I looked now…

You should see what was in the LibreOffice codebase at one point!

Re: Electronic Arts Standard Template Library for C++ Open Sourced

#18
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.)

Re: Electronic Arts Standard Template Library for C++ Open Sourced

#20

STL is maybe a bit missleading because it doesn't seem like it is a drop-in replacement for the STL. 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. As far as I remember, Chrome has used the STL earlier. But I looked now…

What parts of the EASTL are faster than the normal STL? Does it have better maps? Edit: From a look at the source it definitely at least has some extra map classes for more specialized uses.

When I first saw that commit, I was all wtf?? wtf?! Thanks for that explanation.
Post reply on HN