diff --git a/Hash_map/benchmark/Hash_map/hm.cpp b/Hash_map/benchmark/Hash_map/hm.cpp index 8a07d7dbdcb..d2d606c4498 100644 --- a/Hash_map/benchmark/Hash_map/hm.cpp +++ b/Hash_map/benchmark/Hash_map/hm.cpp @@ -47,25 +47,27 @@ run(const G& g) boost::rand48 random; boost::random_number_generator rng(random); std::random_shuffle(V.begin(), V.end(), rng); - for(int i=0; i < 10; i++){ - std::cerr << get(vpm,V[i]) << std::endl; - } + Timer t; +#if 0 t.start(); Map vm; BOOST_FOREACH(vertex_descriptor vd, V){ vm[vd] = get(vpm,vd); } t.stop(); std::cerr << "Insertion: " << t.time() << " sec. " << std::endl; +#endif Vector_3 v(0,0,0); + std::size_t st=0; +#if 0 std::cerr << "BOOST_FOREACH std::vector::vertex_iterator> r = vertices(g); + for(int i=0; i<100; i++){ + BOOST_FOREACH(vertex_descriptor vd, r) { #ifdef NOHASH - v = v + (get(vpm,vd) - CGAL::ORIGIN); + st += std::size_t(vd); + // v = v + (get(vpm,vd) - CGAL::ORIGIN); #else typename Map::iterator it = vm.find(vd); v = v + ((*it).second - CGAL::ORIGIN); @@ -93,11 +100,12 @@ run(const G& g) std::cerr << "BOOST_FOREACH CGAL::Iterator_range r = vertices(g))\n"; t.reset(); t.start(); - for(int i=0; i<100; i++){ CGAL::Iterator_range::vertex_iterator> ir = vertices(g); + for(int i=0; i<100; i++){ BOOST_FOREACH(vertex_descriptor vd, ir) { -#ifdef NOHASH - v = v + (get(vpm,vd) - CGAL::ORIGIN); +#ifdef NOHASH + st += std::size_t(vd); + //v = v + (get(vpm,vd) - CGAL::ORIGIN); #else typename Map::iterator it = vm.find(vd); v = v + ((*it).second - CGAL::ORIGIN); @@ -110,8 +118,9 @@ run(const G& g) t.reset(); t.start(); for(int i=0; i<100; i++){ BOOST_FOREACH(vertex_descriptor vd, vertices(g)) { -#ifdef NOHASH - v = v + (get(vpm,vd) - CGAL::ORIGIN); +#ifdef NOHASH + st += std::size_t(vd); + //v = v + (get(vpm,vd) - CGAL::ORIGIN); #else typename Map::iterator it = vm.find(vd); v = v + ((*it).second - CGAL::ORIGIN); @@ -120,6 +129,7 @@ run(const G& g) } t.stop(); std::cerr << " " <(m); +#if 0 std::cerr << "\nSurface_mesh std::unordered_map"<< std::endl; run(m); std::cerr << "\nSurface_mesh boost::unordered_map"<< std::endl; run(m); +#endif } -#if 1 + +#if 0 { typedef CGAL::Polyhedron_3 Mesh; typedef boost::graph_traits::vertex_descriptor vertex_descriptor; diff --git a/Stream_support/include/CGAL/IO/io.h b/Stream_support/include/CGAL/IO/io.h index d416f268630..3e16c8d18b6 100644 --- a/Stream_support/include/CGAL/IO/io.h +++ b/Stream_support/include/CGAL/IO/io.h @@ -140,7 +140,6 @@ public: } }while(true); - std::cerr << "|" << buffer.c_str() << "|" << std::endl; if(sscanf(buffer.c_str(), "%lf", &t) != 1) { // if a 'buffer' does not contain a double, set the fail bit. is.setstate(std::ios_base::failbit);