Skip to content

Commit ea71597

Browse files
committed
Remove multi_index from benchmarks
1 parent ee8f2b9 commit ea71597

5 files changed

Lines changed: 0 additions & 136 deletions

File tree

‎benchmark/string.cpp‎

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
#include <boost/unordered_map.hpp>
88
#include <boost/unordered/unordered_flat_map.hpp>
9-
#include <boost/multi_index_container.hpp>
10-
#include <boost/multi_index/hashed_index.hpp>
11-
#include <boost/multi_index/member.hpp>
129
#include <boost/core/detail/splitmix64.hpp>
1310
#include <boost/config.hpp>
1411
#ifdef HAVE_ABSEIL
@@ -267,24 +264,6 @@ template<template<class...> class Map> BOOST_NOINLINE void test( char const* lab
267264
times.push_back( rec );
268265
}
269266

270-
// multi_index emulation of unordered_map
271-
272-
template<class K, class V> struct pair
273-
{
274-
K first;
275-
mutable V second;
276-
};
277-
278-
using namespace boost::multi_index;
279-
280-
template<class K, class V> using multi_index_map = multi_index_container<
281-
pair<K, V>,
282-
indexed_by<
283-
hashed_unique< member<pair<K, V>, K, &pair<K, V>::first> >
284-
>,
285-
::allocator< pair<K, V> >
286-
>;
287-
288267
// aliases using the counting allocator
289268

290269
template<class K, class V> using allocator_for = ::allocator< std::pair<K const, V> >;
@@ -384,14 +363,6 @@ template<class K, class V> using boost_unordered_map_fnv1a =
384363
template<class K, class V> using boost_unordered_flat_map_fnv1a =
385364
boost::unordered_flat_map<K, V, fnv1a_hash, std::equal_to<K>, allocator_for<K, V>>;
386365

387-
template<class K, class V> using multi_index_map_fnv1a = multi_index_container<
388-
pair<K, V>,
389-
indexed_by<
390-
hashed_unique< member<pair<K, V>, K, &pair<K, V>::first>, fnv1a_hash >
391-
>,
392-
::allocator< pair<K, V> >
393-
>;
394-
395366
#ifdef HAVE_ABSEIL
396367

397368
template<class K, class V> using absl_node_hash_map_fnv1a =
@@ -428,12 +399,9 @@ int main()
428399
{
429400
init_indices();
430401

431-
#if 1
432-
433402
test<std_unordered_map>( "std::unordered_map" );
434403
test<boost_unordered_map>( "boost::unordered_map" );
435404
test<boost_unordered_flat_map>( "boost::unordered_flat_map" );
436-
test<multi_index_map>( "multi_index_map" );
437405

438406
#ifdef HAVE_ABSEIL
439407

@@ -454,14 +422,11 @@ int main()
454422
test<tsl_robin_map>( "tsl::robin_map" );
455423
test<tsl_robin_pg_map>( "tsl::robin_pg_map" );
456424

457-
#endif
458-
459425
#endif
460426

461427
test<std_unordered_map_fnv1a>( "std::unordered_map, FNV-1a" );
462428
test<boost_unordered_map_fnv1a>( "boost::unordered_map, FNV-1a" );
463429
test<boost_unordered_flat_map_fnv1a>( "boost::unordered_flat_map, FNV-1a" );
464-
test<multi_index_map_fnv1a>( "multi_index_map, FNV-1a" );
465430

466431
#ifdef HAVE_ABSEIL
467432

‎benchmark/string_view.cpp‎

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
#include <boost/unordered_map.hpp>
88
#include <boost/unordered/unordered_flat_map.hpp>
9-
#include <boost/multi_index_container.hpp>
10-
#include <boost/multi_index/hashed_index.hpp>
11-
#include <boost/multi_index/member.hpp>
129
#include <boost/core/detail/splitmix64.hpp>
1310
#include <boost/config.hpp>
1411
#ifdef HAVE_ABSEIL
@@ -268,24 +265,6 @@ template<template<class...> class Map> BOOST_NOINLINE void test( char const* lab
268265
times.push_back( rec );
269266
}
270267

271-
// multi_index emulation of unordered_map
272-
273-
template<class K, class V> struct pair
274-
{
275-
K first;
276-
mutable V second;
277-
};
278-
279-
using namespace boost::multi_index;
280-
281-
template<class K, class V> using multi_index_map = multi_index_container<
282-
pair<K, V>,
283-
indexed_by<
284-
hashed_unique< member<pair<K, V>, K, &pair<K, V>::first> >
285-
>,
286-
::allocator< pair<K, V> >
287-
>;
288-
289268
// aliases using the counting allocator
290269

291270
template<class K, class V> using allocator_for = ::allocator< std::pair<K const, V> >;
@@ -385,14 +364,6 @@ template<class K, class V> using boost_unordered_map_fnv1a =
385364
template<class K, class V> using boost_unordered_flat_map_fnv1a =
386365
boost::unordered_flat_map<K, V, fnv1a_hash, std::equal_to<K>, allocator_for<K, V>>;
387366

388-
template<class K, class V> using multi_index_map_fnv1a = multi_index_container<
389-
pair<K, V>,
390-
indexed_by<
391-
hashed_unique< member<pair<K, V>, K, &pair<K, V>::first>, fnv1a_hash >
392-
>,
393-
::allocator< pair<K, V> >
394-
>;
395-
396367
#ifdef HAVE_ABSEIL
397368

398369
template<class K, class V> using absl_node_hash_map_fnv1a =
@@ -429,12 +400,9 @@ int main()
429400
{
430401
init_indices();
431402

432-
#if 1
433-
434403
test<std_unordered_map>( "std::unordered_map" );
435404
test<boost_unordered_map>( "boost::unordered_map" );
436405
test<boost_unordered_flat_map>( "boost::unordered_flat_map" );
437-
test<multi_index_map>( "multi_index_map" );
438406

439407
#ifdef HAVE_ABSEIL
440408

@@ -455,14 +423,11 @@ int main()
455423
test<tsl_robin_map>( "tsl::robin_map" );
456424
test<tsl_robin_pg_map>( "tsl::robin_pg_map" );
457425

458-
#endif
459-
460426
#endif
461427

462428
test<std_unordered_map_fnv1a>( "std::unordered_map, FNV-1a" );
463429
test<boost_unordered_map_fnv1a>( "boost::unordered_map, FNV-1a" );
464430
test<boost_unordered_flat_map_fnv1a>( "boost::unordered_flat_map, FNV-1a" );
465-
test<multi_index_map_fnv1a>( "multi_index_map, FNV-1a" );
466431

467432
#ifdef HAVE_ABSEIL
468433

‎benchmark/uint32.cpp‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
#include <boost/unordered_map.hpp>
88
#include <boost/unordered/unordered_flat_map.hpp>
9-
#include <boost/multi_index_container.hpp>
10-
#include <boost/multi_index/hashed_index.hpp>
11-
#include <boost/multi_index/member.hpp>
129
#include <boost/endian/conversion.hpp>
1310
#include <boost/core/detail/splitmix64.hpp>
1411
#include <boost/config.hpp>
@@ -284,24 +281,6 @@ template<template<class...> class Map> BOOST_NOINLINE void test( char const* lab
284281
times.push_back( rec );
285282
}
286283

287-
// multi_index emulation of unordered_map
288-
289-
template<class K, class V> struct pair
290-
{
291-
K first;
292-
mutable V second;
293-
};
294-
295-
using namespace boost::multi_index;
296-
297-
template<class K, class V> using multi_index_map = multi_index_container<
298-
pair<K, V>,
299-
indexed_by<
300-
hashed_unique< member<pair<K, V>, K, &pair<K, V>::first> >
301-
>,
302-
::allocator< pair<K, V> >
303-
>;
304-
305284
// aliases using the counting allocator
306285

307286
template<class K, class V> using allocator_for = ::allocator< std::pair<K const, V> >;
@@ -352,7 +331,6 @@ int main()
352331
test<std_unordered_map>( "std::unordered_map" );
353332
test<boost_unordered_map>( "boost::unordered_map" );
354333
test<boost_unordered_flat_map>( "boost::unordered_flat_map" );
355-
test<multi_index_map>( "multi_index_map" );
356334

357335
#ifdef HAVE_ABSEIL
358336

‎benchmark/uint64.cpp‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
#include <boost/unordered_map.hpp>
88
#include <boost/unordered/unordered_flat_map.hpp>
9-
#include <boost/multi_index_container.hpp>
10-
#include <boost/multi_index/hashed_index.hpp>
11-
#include <boost/multi_index/member.hpp>
129
#include <boost/endian/conversion.hpp>
1310
#include <boost/core/detail/splitmix64.hpp>
1411
#include <boost/config.hpp>
@@ -284,24 +281,6 @@ template<template<class...> class Map> BOOST_NOINLINE void test( char const* lab
284281
times.push_back( rec );
285282
}
286283

287-
// multi_index emulation of unordered_map
288-
289-
template<class K, class V> struct pair
290-
{
291-
K first;
292-
mutable V second;
293-
};
294-
295-
using namespace boost::multi_index;
296-
297-
template<class K, class V> using multi_index_map = multi_index_container<
298-
pair<K, V>,
299-
indexed_by<
300-
hashed_unique< member<pair<K, V>, K, &pair<K, V>::first> >
301-
>,
302-
::allocator< pair<K, V> >
303-
>;
304-
305284
// aliases using the counting allocator
306285

307286
template<class K, class V> using allocator_for = ::allocator< std::pair<K const, V> >;
@@ -352,7 +331,6 @@ int main()
352331
test<std_unordered_map>( "std::unordered_map" );
353332
test<boost_unordered_map>( "boost::unordered_map" );
354333
test<boost_unordered_flat_map>( "boost::unordered_flat_map" );
355-
test<multi_index_map>( "multi_index_map" );
356334

357335
#ifdef HAVE_ABSEIL
358336

‎benchmark/uuid.cpp‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
#include <boost/unordered_map.hpp>
88
#include <boost/unordered/unordered_flat_map.hpp>
9-
#include <boost/multi_index_container.hpp>
10-
#include <boost/multi_index/hashed_index.hpp>
11-
#include <boost/multi_index/member.hpp>
129
#include <boost/endian/conversion.hpp>
1310
#include <boost/core/detail/splitmix64.hpp>
1411
#include <boost/container_hash/hash.hpp>
@@ -329,24 +326,6 @@ template<template<class...> class Map> BOOST_NOINLINE void test( char const* lab
329326
times.push_back( rec );
330327
}
331328

332-
// multi_index emulation of unordered_map
333-
334-
template<class K, class V> struct pair
335-
{
336-
K first;
337-
mutable V second;
338-
};
339-
340-
using namespace boost::multi_index;
341-
342-
template<class K, class V> using multi_index_map = multi_index_container<
343-
pair<K, V>,
344-
indexed_by<
345-
hashed_unique< member<pair<K, V>, K, &pair<K, V>::first> >
346-
>,
347-
::allocator< pair<K, V> >
348-
>;
349-
350329
// aliases using the counting allocator
351330

352331
template<class K, class V> using allocator_for = ::allocator< std::pair<K const, V> >;
@@ -377,7 +356,6 @@ int main()
377356
test<std_unordered_map>( "std::unordered_map" );
378357
test<boost_unordered_map>( "boost::unordered_map" );
379358
test<boost_unordered_flat_map>( "boost::unordered_flat_map" );
380-
test<multi_index_map>( "multi_index_map" );
381359

382360
#ifdef HAVE_ABSEIL
383361

0 commit comments

Comments
 (0)