set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDSUNIT_USE_URCU")
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/delodd)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/del3)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/find_string)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_item_int)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/delodd)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/del3)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/find_string)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_item_int)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdelfind)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/minmax)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/minmax)
#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/iter_erase)
add_custom_target( stress-sequential-map
DEPENDS
- stress-sequential-map-delodd
- stress-sequential-map-del3
- stress-sequential-map-find-string
- stress-sequential-map-insdel-func
- stress-sequential-map-insdel-string
- stress-sequential-map-insdel-item-int
+ #stress-sequential-map-delodd
+ #stress-sequential-map-del3
+ #stress-sequential-map-find-string
+ #stress-sequential-map-insdel-func
+ #stress-sequential-map-insdel-string
+ #stress-sequential-map-insdel-item-int
stress-sequential-map-insdelfind
- stress-sequential-map-minmax
+ #stress-sequential-map-minmax
#stress-sequential-map-iter-erase
)
set(CDSSTRESS_MAP_FIND_STRING_SOURCES
../../../main.cpp
map_find_string.cpp
+ #map_find_string_cuckoo.cpp
+ map_find_string_split.cpp
map_find_string_bronsonavltree.cpp
- map_find_string_cuckoo.cpp
map_find_string_ellentree.cpp
map_find_string_feldman_hashset.cpp
map_find_string_michael.cpp
map_find_string_skip.cpp
- map_find_string_split.cpp
- map_find_string_std.cpp
- map_find_string_striped.cpp
+ #map_find_string_std.cpp
+ #map_find_string_striped.cpp
)
include_directories(
size_t Map_find_string::s_nEllenBinTreeMapPassCount = 100;
size_t Map_find_string::s_nMichaelMapPassCount = 100;
size_t Map_find_string::s_nSkipListMapPassCount = 100;
+ size_t Map_find_string::s_nSplitListMapPassCount = 100;
size_t Map_find_string::s_nCuckooInitialSize = 1024;
size_t Map_find_string::s_nCuckooProbesetSize = 16;
if (s_nSkipListMapPassCount == 0)
s_nSkipListMapPassCount = 500;
+ s_nSplitListMapPassCount =
+ cfg.get_size_t("SplitListMapPassCount", s_nSplitListMapPassCount);
+ if (s_nSplitListMapPassCount == 0)
+ s_nSplitListMapPassCount = 500;
+
s_nPercentExists = cfg.get_size_t("PercentExists", s_nPercentExists);
if (s_nPercentExists > 100)
s_nPercentExists = 100;
static size_t s_nFeldmanPassCount;
static size_t s_nMichaelMapPassCount;
static size_t s_nSkipListMapPassCount;
+ static size_t s_nSplitListMapPassCount;
static size_t s_nMaxLoadFactor; // maximum load factor
run_test<Map>();
}
+ template <class Map>
+ void run_split_list() {
+ Map_find_string::s_nPassCount =
+ Map_find_string::s_nSplitListMapPassCount;
+ run_test<Map>();
+ }
+
};
class Map_find_string_stdhash: public Map_find_string
namespace map {
- CDSSTRESS_SplitListMap( Map_find_string_LF, run_test, std::string, Map_find_string::value_type )
- CDSSTRESS_SplitListIterableMap( Map_find_string_LF, run_test, std::string, Map_find_string::value_type )
- CDSSTRESS_SplitListMap_nogc( Map_find_string_LF, run_test, std::string, Map_find_string::value_type )
+ CDSSTRESS_SplitListMap( Map_find_string_LF, run_split_list, std::string, Map_find_string::value_type )
+ CDSSTRESS_SplitListIterableMap( Map_find_string_LF, run_split_list, std::string, Map_find_string::value_type )
+ CDSSTRESS_SplitListMap_nogc( Map_find_string_LF, run_split_list, std::string, Map_find_string::value_type )
} // namespace map
../../../main.cpp
map_insdel_string.cpp
map_insdel_string_bronsonavltree.cpp
- map_insdel_string_cuckoo.cpp
+ #map_insdel_string_cuckoo.cpp
map_insdel_string_ellentree.cpp
map_insdel_string_feldman_hashset.cpp
map_insdel_string_michael.cpp
map_insdel_string_skip.cpp
map_insdel_string_split.cpp
- map_insdel_string_std.cpp
- map_insdel_string_striped.cpp
+ #map_insdel_string_std.cpp
+ #map_insdel_string_striped.cpp
)
include_directories(
size_t Map_InsDel_string::s_nEllenBinTreeMapPassCount = 100;
size_t Map_InsDel_string::s_nMichaelMapPassCount = 100;
size_t Map_InsDel_string::s_nSkipListMapPassCount = 100;
+ size_t Map_InsDel_string::s_nSplitListMapPassCount = 100;
size_t Map_InsDel_string::s_nMaxLoadFactor = 8; // maximum load factor
if (s_nSkipListMapPassCount == 0)
s_nSkipListMapPassCount = 500;
+ s_nSplitListMapPassCount =
+ cfg.get_size_t("SplitListMapPassCount", s_nSplitListMapPassCount);
+ if (s_nSplitListMapPassCount == 0)
+ s_nSplitListMapPassCount = 500;
+
s_nMaxLoadFactor = cfg.get_size_t( "MaxLoadFactor", s_nMaxLoadFactor );
if ( s_nMaxLoadFactor == 0 )
s_nMaxLoadFactor = 1;
static size_t s_nFeldmanPassCount;
static size_t s_nMichaelMapPassCount;
static size_t s_nSkipListMapPassCount;
+ static size_t s_nSplitListMapPassCount;
static size_t s_nMaxLoadFactor; // maximum load factor
Map_InsDel_string::s_nSkipListMapPassCount;
run_test<Map>();
}
+
+ template <class Map>
+ void run_split_list() {
+ Map_InsDel_string::s_nThreadPassCount =
+ Map_InsDel_string::s_nSplitListMapPassCount;
+ run_test<Map>();
+ }
};
class Map_InsDel_string_stdhash: public Map_InsDel_string
namespace map {
- CDSSTRESS_SplitListMap( Map_InsDel_string_LF, run_test, std::string, size_t )
- CDSSTRESS_SplitListIterableMap( Map_InsDel_string_LF, run_test, std::string, size_t )
+ CDSSTRESS_SplitListMap( Map_InsDel_string_LF, run_split_list, std::string, size_t )
+ CDSSTRESS_SplitListIterableMap( Map_InsDel_string_LF, run_split_list, std::string, size_t )
} // namespace map
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDSUNIT_USE_URCU")
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/del3)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/delodd)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/del3)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/delodd)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_find)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/iteration)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string)
+#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/iteration)
#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/iter_erase)
add_custom_target( stress-sequential-set
DEPENDS
- stress-sequential-set-del3
- stress-sequential-set-delodd
+ #stress-sequential-set-del3
+ #stress-sequential-set-delodd
stress-sequential-set-insdelfind
- stress-sequential-set-insdel-func
- stress-sequential-set-insdel-string
- stress-sequential-set-iteration
+ #stress-sequential-set-insdel-func
+ #stress-sequential-set-insdel-string
+ #stress-sequential-set-iteration
#stress-sequential-set-iter-erase
)
target_link_libraries(${EXE_SET_INSDELFIND_RCU} ${CDS_TEST_LIBRARIES} ${CDSSTRESS_FRAMEWORK_LIBRARY})
add_test(NAME ${EXE_SET_INSDELFIND_RCU} COMMAND ${EXE_SET_INSDELFIND_RCU} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
-add_executable(${EXE_SET_INSDELFIND_LOCK} ${CDSSTRESS_SET_INSDELFIND_LOCK_SOURCES})
-target_link_libraries(${EXE_SET_INSDELFIND_LOCK} ${CDS_TEST_LIBRARIES} ${CDSSTRESS_FRAMEWORK_LIBRARY})
-add_test(NAME ${EXE_SET_INSDELFIND_LOCK} COMMAND ${EXE_SET_INSDELFIND_LOCK} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+#add_executable(${EXE_SET_INSDELFIND_LOCK} ${CDSSTRESS_SET_INSDELFIND_LOCK_SOURCES})
+#target_link_libraries(${EXE_SET_INSDELFIND_LOCK} ${CDS_TEST_LIBRARIES} ${CDSSTRESS_FRAMEWORK_LIBRARY})
+#add_test(NAME ${EXE_SET_INSDELFIND_LOCK} COMMAND ${EXE_SET_INSDELFIND_LOCK} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
add_custom_target( stress-sequential-set-insdelfind
DEPENDS
stress-sequential-set-insdelfind-hp
stress-sequential-set-insdelfind-rcu
- stress-sequential-set-insdelfind-lock
+ #stress-sequential-set-insdelfind-lock
)
namespace set {
size_t Set_InsDelFind::s_nSetSize = 500000; // initial set size
- size_t Set_InsDelFind::s_nPassCount = 500000; // initial pass count
+ size_t Set_InsDelFind::s_nPassCount = 500000; // initial pass count
+ size_t Set_InsDelFind::s_nFeldmanPassCount = 100;
+ size_t Set_InsDelFind::s_nBronsonAVLTreeMapPassCount = 100;
+ size_t Set_InsDelFind::s_nEllenBinTreeMapPassCount = 100;
+ size_t Set_InsDelFind::s_nMichaelMapPassCount = 100;
+ size_t Set_InsDelFind::s_nSkipListMapPassCount = 100;
+ size_t Set_InsDelFind::s_nSplitListMapPassCount = 100;
size_t Set_InsDelFind::s_nThreadCount = 8; // thread count
size_t Set_InsDelFind::s_nMaxLoadFactor = 8; // maximum load factor
void Set_InsDelFind::SetUpTestCase()
{
- cds_test::config const& cfg = get_config( "sequential_map_insdelfind" );
+ cds_test::config const& cfg = get_config( "sequential_set_insdelfind" );
s_nSetSize = cfg.get_size_t( "InitialMapSize", s_nSetSize );
if ( s_nSetSize < 1000 )
if ( s_nPassCount < 1000 )
s_nPassCount = 1000;
+ s_nFeldmanPassCount =
+ cfg.get_size_t("FeldmanPassCount", s_nFeldmanPassCount);
+ if (s_nFeldmanPassCount == 0)
+ s_nFeldmanPassCount = 500;
+
+ s_nBronsonAVLTreeMapPassCount = cfg.get_size_t(
+ "BronsonAVLTreeMapPassCount", s_nBronsonAVLTreeMapPassCount);
+ if (s_nBronsonAVLTreeMapPassCount == 0)
+ s_nBronsonAVLTreeMapPassCount = 500;
+
+ s_nEllenBinTreeMapPassCount = cfg.get_size_t(
+ "EllenBinTreeMapPassCount", s_nEllenBinTreeMapPassCount);
+ if (s_nEllenBinTreeMapPassCount == 0)
+ s_nEllenBinTreeMapPassCount = 500;
+
+ s_nMichaelMapPassCount =
+ cfg.get_size_t("MichaelMapPassCount", s_nMichaelMapPassCount);
+ if (s_nMichaelMapPassCount == 0)
+ s_nMichaelMapPassCount = 500;
+
+ s_nSkipListMapPassCount =
+ cfg.get_size_t("SkipListMapPassCount", s_nSkipListMapPassCount);
+ if (s_nSkipListMapPassCount == 0)
+ s_nSkipListMapPassCount = 500;
+
+ s_nSplitListMapPassCount =
+ cfg.get_size_t("SplitListMapPassCount", s_nSplitListMapPassCount);
+ if (s_nSplitListMapPassCount == 0)
+ s_nSplitListMapPassCount = 500;
+
s_nThreadCount = cfg.get_size_t( "ThreadCount", s_nThreadCount );
if ( s_nThreadCount == 0 )
s_nThreadCount = 2;
public:
static size_t s_nSetSize; // initial set size
static size_t s_nPassCount; // initial set size
+ static size_t s_nBronsonAVLTreeMapPassCount;
+ static size_t s_nEllenBinTreeMapPassCount;
+ static size_t s_nFeldmanPassCount;
+ static size_t s_nMichaelMapPassCount;
+ static size_t s_nSkipListMapPassCount;
+ static size_t s_nSplitListMapPassCount;
+
static size_t s_nThreadCount; // thread count
static size_t s_nMaxLoadFactor; // maximum load factor
static unsigned int s_nInsertPercentage;
Set s( *this );
do_test( s );
}
+
+ template <class Set>
+ void run_bronson_avl_tree() {
+ Set_InsDelFind::s_nPassCount =
+ Set_InsDelFind::s_nBronsonAVLTreeMapPassCount;
+ run_test<Set>();
+ }
+
+ template <class Set>
+ void run_ellen_bin_tree() {
+ Set_InsDelFind::s_nPassCount =
+ Set_InsDelFind::s_nEllenBinTreeMapPassCount;
+ run_test<Set>();
+ }
+
+ template <class Set>
+ void run_feldman() {
+ Set_InsDelFind::s_nPassCount =
+ Set_InsDelFind::s_nFeldmanPassCount;
+ run_test<Set>();
+ }
+
+ template <class Set>
+ void run_skip_list() {
+ Set_InsDelFind::s_nPassCount =
+ Set_InsDelFind::s_nSkipListMapPassCount;
+ run_test<Set>();
+ }
};
class Set_InsDelFind_LF: public Set_InsDelFind
Set_InsDelFind::run_test<Set>();
}
+ template <class Set>
+ void run_michael() {
+ Set_InsDelFind::s_nPassCount =
+ Set_InsDelFind::s_nMichaelMapPassCount;
+ Set_InsDelFind_LF::run_test<Set>();
+ }
+
+ template <class Set>
+ void run_split_list() {
+ Set_InsDelFind::s_nPassCount =
+ Set_InsDelFind::s_nSplitListMapPassCount;
+ Set_InsDelFind_LF::run_test<Set>();
+ }
+
static std::vector<size_t> get_load_factors();
};
namespace set {
- CDSSTRESS_EllenBinTreeSet_HP( Set_InsDelFind, run_test, size_t, size_t )
+ CDSSTRESS_EllenBinTreeSet_HP( Set_InsDelFind, run_ellen_bin_tree, size_t, size_t )
} // namespace set
namespace set {
- CDSSTRESS_EllenBinTreeSet_RCU( Set_InsDelFind, run_test, size_t, size_t )
+ CDSSTRESS_EllenBinTreeSet_RCU( Set_InsDelFind, run_ellen_bin_tree, size_t, size_t )
} // namespace set
namespace set {
- CDSSTRESS_FeldmanHashSet_fixed_HP( Set_InsDelFind, run_test, size_t, size_t )
+ CDSSTRESS_FeldmanHashSet_fixed_HP( Set_InsDelFind, run_feldman, size_t, size_t )
} // namespace set
namespace set {
- CDSSTRESS_FeldmanHashSet_fixed_RCU( Set_InsDelFind, run_test, size_t, size_t )
+ CDSSTRESS_FeldmanHashSet_fixed_RCU( Set_InsDelFind, run_feldman, size_t, size_t )
} // namespace set
namespace set {
- CDSSTRESS_MichaelSet_HP( Set_InsDelFind_LF, run_test, size_t, size_t )
+ CDSSTRESS_MichaelSet_HP( Set_InsDelFind_LF, run_michael, size_t, size_t )
CDSSTRESS_MichaelIterableSet( Set_InsDelFind_LF, run_test, size_t, size_t )
} // namespace set
namespace set {
- CDSSTRESS_MichaelSet_RCU( Set_InsDelFind_LF, run_test, size_t, size_t )
+ CDSSTRESS_MichaelSet_RCU( Set_InsDelFind_LF, run_michael, size_t, size_t )
} // namespace set
namespace set {
- CDSSTRESS_SkipListSet_HP( Set_InsDelFind, run_test, size_t, size_t )
+ CDSSTRESS_SkipListSet_HP( Set_InsDelFind, run_skip_list, size_t, size_t )
} // namespace set
namespace set {
- CDSSTRESS_SkipListSet_RCU( Set_InsDelFind, run_test, size_t, size_t )
+ CDSSTRESS_SkipListSet_RCU( Set_InsDelFind, run_skip_list, size_t, size_t )
} // namespace set
namespace set {
- CDSSTRESS_SplitListSet_HP( Set_InsDelFind_LF, run_test, size_t, size_t )
- CDSSTRESS_SplitListIterableSet( Set_InsDelFind_LF, run_test, size_t, size_t )
+ CDSSTRESS_SplitListSet_HP( Set_InsDelFind_LF, run_split_list, size_t, size_t )
+ CDSSTRESS_SplitListIterableSet( Set_InsDelFind_LF, run_split_list, size_t, size_t )
} // namespace set
namespace set {
- CDSSTRESS_SplitListSet_RCU( Set_InsDelFind_LF, run_test, size_t, size_t )
+ CDSSTRESS_SplitListSet_RCU( Set_InsDelFind_LF, run_split_list, size_t, size_t )
} // namespace set