在 2013年12月10日星期二 UTC+8下午5:28:21,Chris Pearce写道:
Hi All,
Can we start using C++ STL containers like std::set, std::map,
std::queue in Mozilla code please? Many of the STL containers are more
convenient to use than our equivalents, and more familiar to new
contributors.
I understand
On 12/10/2013 16:17, Joshua Cranmer wrote:
I think the right answer is to make the myriad of datatypes we have more
STL-ish--as a first step at least, can we at least add iterator support
for them and get rid of the abominable
EnumerateForwards/EnumerateBackewards methods? This would allow us
Hi All,
Can we start using C++ STL containers like std::set, std::map,
std::queue in Mozilla code please? Many of the STL containers are more
convenient to use than our equivalents, and more familiar to new
contributors.
I understand that we used to have a policy of not using STL in mozilla
Note that we already do use at least those STL containers for which we
don't have an equivalent in the tree. I've seen usage of at least:
std::map, std::set, and std::bitset.
I think that Nick has a good point about reporting memory usage, but I
think that the right solution to this problem is to
Also note that IIUC, the only thing that prevents us from solving the
memory-reporting problem using a STL allocator, is that the spec doesn't
allow us to rely on storing per-object member data on a STL allocator.
Even without that, we could at least have a STL allocator doing
On 12/10/2013 11:28 AM, Chris Pearce wrote:
Hi All,
Can we start using C++ STL containers like std::set, std::map, std::queue in
Mozilla code please? Many of the STL containers are more convenient to
use than our equivalents, and more familiar to new contributors.
I understand that we used to
On 12/10/13 9:49 AM, Benoit Jacob wrote:
since AFAIK we don't have a HashSet class in mfbt or xpcom.
It's called nsBaseHashtable. Granted, using it as a hashset is not that
intuitive.
-Boris
___
dev-platform mailing list
On Tue, Dec 10, 2013 at 1:28 AM, Chris Pearce cpea...@mozilla.com wrote:
Hi All,
Can we start using C++ STL containers like std::set, std::map, std::queue
in Mozilla code please? Many of the STL containers are more convenient to
use than our equivalents, and more familiar to new
On 12/10/13 9:09 AM, Boris Zbarsky wrote:
On 12/10/13 9:49 AM, Benoit Jacob wrote:
since AFAIK we don't have a HashSet class in mfbt or xpcom.
It's called nsBaseHashtable. Granted, using it as a hashset is not
that intuitive.
There's also js::HashSet in js/public/HashTable.h.
-j
On 12/10/2013 3:28 AM, Chris Pearce wrote:
Hi All,
Can we start using C++ STL containers like std::set, std::map,
std::queue in Mozilla code please? Many of the STL containers are more
convenient to use than our equivalents, and more familiar to new
contributors.
I understand that we used
On 12/10/2013 9:49 AM, Benoit Jacob wrote:
std::set compared to using a hashtable to do the same thing, since AFAIK we
don't have a HashSet class in mfbt or xpcom.
nsTHashtableKeyType is the XPCOM hashset.
--BDS
___
dev-platform mailing list
On 12/10/2013 4:28 AM, Chris Pearce wrote:
Hi All,
Can we start using C++ STL containers like std::set, std::map,
std::queue in Mozilla code please? Many of the STL containers are more
convenient to use than our equivalents, and more familiar to new
contributors.
njn already mentioned the
On 12/10/2013 09:49 AM, Benoit Jacob wrote:
std::map and std::set are also free of any size restriction, and do not
require a contiguous part of our address space (see
https://bugzilla.mozilla.org/show_bug.cgi?id=944810#c12 ) , so they won't
run OOM before we are actually OOM.
I posit that if
It seems to me that we should be optimizing for developer productivity
first, and use profiling tools to find code that needs to be optimized.
i.e. we should be able to use STL containers where we need basic ADTs in
day-to-day coding, and if instances of these containers show up in
profiles
On Wed, Dec 11, 2013 at 10:29 AM, Chris Pearce cpea...@mozilla.com wrote:
It seems to me that we should be optimizing for developer productivity
first, and use profiling tools to find code that needs to be optimized.
i.e. we should be able to use STL containers where we need basic ADTs in
2013/12/10 Chris Pearce cpea...@mozilla.com
It seems to me that we should be optimizing for developer productivity
first, and use profiling tools to find code that needs to be optimized.
i.e. we should be able to use STL containers where we need basic ADTs in
day-to-day coding, and if
Also note that IIUC, the only thing that prevents us from solving the
memory-reporting problem using a STL allocator, is that the spec doesn't
allow us to rely on storing per-object member data on a STL allocator.
I believe C++11 supports this.
Cheers,
Botond
On Tue, Dec 10, 2013 at 09:17:22AM -0600, Joshua Cranmer ? wrote:
On 12/10/2013 3:28 AM, Chris Pearce wrote:
Hi All,
Can we start using C++ STL containers like std::set, std::map,
std::queue in Mozilla code please? Many of the STL containers are
more convenient to use than our equivalents,
On Wed, Dec 11, 2013 at 10:50 AM, Benoit Jacob jacob.benoi...@gmail.comwrote:
2013/12/10 Robert O'Callahan rob...@ocallahan.org
Keep in mind that proliferation of different types for the same
functionality hurts developer productivity in various ways, especially
when
they have quite
On 12/10/2013 3:29 PM, Chris Pearce wrote:
It seems to me that we should be optimizing for developer productivity
first, and use profiling tools to find code that needs to be optimized.
For many of our developers, the STL is not an API that they are
intimately familiar with, so it's not
- Original Message -
From: Robert O'Callahan rob...@ocallahan.org
To: Benoit Jacob jacob.benoi...@gmail.com
Cc: Chris Pearce cpea...@mozilla.com, dev-platform
dev-platform@lists.mozilla.org
Sent: Tuesday, December 10, 2013 2:04:06 PM
Subject: Re: Can we start using C++ STL containers in Mozilla
For many of our developers, the STL is not an API that they are
intimately familiar with, so it's not altogether clear that using the
STL instead optimizes for developer productivity.
Developers come and go, however, and the average C++ developer is
more likely to be familiar with STL
[I'm highlighting this exchange, because it's been buried somewhat;
apologies for the misleading information]
On Tue, Dec 10, 2013 at 4:29 PM, Joshua Cranmer pidgeo...@gmail.com wrote:
Based on
23 matches
Mail list logo