Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash


Chronological Thread 
  • From: Marc Glisse <>
  • To:
  • Cc:
  • Subject: Re: [cgal-discuss] Re: CGAL+GMP and multithreading crash
  • Date: Tue, 1 May 2012 21:39:14 +0200 (CEST)

On Tue, 1 May 2012, Philipp Moeller wrote:

Another approach I have been pondering is to simply throw all our ref
counted objects into shared_ptr.

That is a possibility, but the interface is far from a perfect match, especially if you take all the variants we have in cgal into account.

At least the boost version uses atomic counters on most platforms

The standard libraries that come with gcc, llvm and visual studio all do.

This might have some drawbacks I don't see yet. At least
boost::shared_ptr is known to have some performance deficiencies
compared to vendor implementations.

shared_ptr has heavier functionalities than a simple reference-counted structure which makes it unavoidably slower. The boost library might be particularly bad, I don't know, but the last time I looked (possibly 2009), if I remember correctly, it was orders of magnitude slower than anything else I tried, for this use. Or maybe that was gcc's placeholder atomic implementation (they have a real one now)? Well, boost certainly wasn't among the faster alternatives.

It is certainly worth reevaluating today, if someone has time...

--
Marc Glisse



Archive powered by MHonArc 2.6.16.

Top of Page