EA releases EASTL

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

EA releases EASTL

Post by Kojack »

EA have an open source site at http://gpl.ea.com. Under the Skate3 heading there's a download of Webkit ported to 360 and ps3 (50MB zip). Deep inside of it is a directory of source code of EASTL, EA's alternative to STL.

To avoid all the other webkit stuff, the eastl code has been extracted and put up at http://github.com/paulhodge/EASTL

Apparently it's not yet known if this is all of eastl or just a portion of it. Several functions need to be implemented before it will work (operator new[], Vsnsprintf8, etc).

Here's the copyright info from one of the source files:
/*
Copyright (C) 2009 Electronic Arts, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of Electronic Arts, Inc. ("EA") nor the names of
its contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ELECTRONIC ARTS AND ITS CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL ELECTRONIC ARTS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
Sounds pretty good.


For an example of how this differs from normal stl, here's some docs from the vector class:
// This file implements a vector (array-like container), much like the C++
// std::vector class.
// The primary distinctions between this vector and std::vector are:
// - vector has a couple extension functions that increase performance.
// - vector can contain objects with alignment requirements. std::vector
// cannot do so without a bit of tedious non-portable effort.
// - vector supports debug memory naming natively.
// - vector is easier to read, debug, and visualize.
// - vector is savvy to an environment that doesn't have exception handling,
// as is sometimes the case with console or embedded environments.
// - vector has less deeply nested function calls and allows the user to
// enable forced inlining in debug builds in order to reduce bloat.
// - vector<bool> is a vector of boolean values and not a bit vector.
// - vector guarantees that memory is contiguous and that vector::iterator
// is nothing more than a pointer to T.
// - vector has an explicit data() method for obtaining a pointer to storage
// which is safe to call even if the block is empty. This avoids the
// common &v[0], &v.front(), and &*v.begin() constructs that trigger false
// asserts in STL debugging modes.
// - vector::size_type is defined as eastl_size_t instead of size_t in order to
// save memory and run faster on 64 bit systems.
// - vector data is guaranteed to be contiguous.
// - vector has a set_capacity() function which frees excess capacity.
// The only way to do this with std::vector is via the cryptic non-obvious
// trick of using: vector<SomeClass>(x).swap(x);
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

Re: EA releases EASTL

Post by betajaen »

I thought they already released it? Or did they just release a document saying what the differences between STL and EASTL was a few years ago?

Either way, it's quite interesting to look at.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: EA releases EASTL

Post by Kojack »

They released the doc 3 years ago, but kept the actual library internal. People have been asking for it (unsuccessfully) ever since.
Here's a page from 2007 where the Eastl author (TwoBit) told us about it: http://www.ogre3d.org/forums/viewtopic.php?f=1&t=32170
and 2006: http://www.ogre3d.org/forums/viewtopic.php?f=1&t=27220

If it wasn't for the fairly permission copyright header, I'd be expecting it to suddenly vanish when EA realise it's been made public. :)
TwoBit
Kobold
Posts: 30
Joined: Sun Dec 17, 2006 5:48 am

Re: EA releases EASTL

Post by TwoBit »

The EASTL that EA released is about 50-60% of EASTL, though some of the more interesting parts of it (e.g. intrusive containers) weren't published. The primary reason for the non-full release was simply that LGPL package that we released which uses EASTL doesn't use all of it. I am looking into the possibility of EA formally publishing all of EASTL, and we have reason to believe that will be possible.

Note: I am the author of EASTL (Paul Pedriana)
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: EA releases EASTL

Post by Klaim »

Thanks! That would be awesome! *ç*

I've seen some guys starting to benchmark EASTL against other STL on their blogs, like this one : http://msinilo.pl/blog/?p=668

Did you guys seen other interesting benchmark and usage?
TwoBit
Kobold
Posts: 30
Joined: Sun Dec 17, 2006 5:48 am

Re: EA releases EASTL

Post by TwoBit »

Those benchmarks are a little hard to interpret, given that the other STL hash tables there at the top aren't general-purpose. EASTL has its own benchmark project, and the code for that is available now for anybody who wants it. I'm going to try to do some work on the publishing effort this week. I have to do it outside my main work, and so it doesn't get the same priority as the main work.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: EA releases EASTL

Post by Klaim »

That's almost what I thought while reading : first it's not tested on all platforms used by EA (I'm thinking about consoles), second those tests don't seem to exploit the specific features (additions or changes) of the EASTL.
User avatar
guyver6
Greenskin
Posts: 106
Joined: Mon Dec 23, 2002 10:16 pm
Location: Warsaw, Poland

Re: EA releases EASTL

Post by guyver6 »

TwoBit wrote:I am looking into the possibility of EA formally publishing all of EASTL, and we have reason to believe that will be possible.
Is it only me who's eagerly waiting for this to happen? :)
BTolputt
Greenskin
Posts: 121
Joined: Thu Feb 18, 2010 8:05 am
x 2

Re: EA releases EASTL

Post by BTolputt »

No, it isn't only you... but alot of us who are eager to see it released are also somewhat pessimistic about EAC actually doing so.
TwoBit
Kobold
Posts: 30
Joined: Sun Dec 17, 2006 5:48 am

Re: EA releases EASTL

Post by TwoBit »

I'm working on the proposal document right now, and I'm thinking of "open-sourcing" the proposal. I'm wondering if there is a mailing list that can be set up somewhere where interested parties can join. I'd like to get it published with a month if possible, so I want to get on it now. Any ideas? I'm thinking of hosting it on Google Code or github and maybe creating a mailing list there (I think only Google supports mailing lists).
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: EA releases EASTL

Post by Klaim »

Google Code + Google Groups would be good I think.

If you want you also can push clones of your repo in bitbucket.org and then allow everybody to get it from google or bitbucket. Personally I prefer google but it's because they have the code review feature and bitbucket is late on this kind of tools. Also more flexible issue system if you want to use it.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: EA releases EASTL

Post by Kojack »

Yay, it's finally happened. EASTL has been fully released under a modified bsd license here: https://github.com/electronicarts/EASTL
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: EA releases EASTL

Post by duststorm »

Great news! :)
I saw some tweets with the good news pass by.
Developer @ MakeHuman.org
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: EA releases EASTL

Post by c6burns »

Very cool, just getting a chance to test drive it tonight. Thanks for the heads up!
Post Reply