forked from MassiveAtoms/hashmap-bench
		
	O P T I O N S
This commit is contained in:
		
							
								
								
									
										62
									
								
								clang-format
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								clang-format
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
---
 | 
			
		||||
BasedOnStyle: WebKit
 | 
			
		||||
AccessModifierOffset: '0'
 | 
			
		||||
AlignAfterOpenBracket: Align
 | 
			
		||||
AlignConsecutiveMacros: 'true'
 | 
			
		||||
AlignConsecutiveAssignments: 'true'
 | 
			
		||||
AlignEscapedNewlines: Left
 | 
			
		||||
AlignTrailingComments: 'true'
 | 
			
		||||
AllowAllArgumentsOnNextLine: 'true'
 | 
			
		||||
AllowAllConstructorInitializersOnNextLine: 'true'
 | 
			
		||||
AllowAllParametersOfDeclarationOnNextLine: 'true'
 | 
			
		||||
AllowShortBlocksOnASingleLine: 'true'
 | 
			
		||||
AllowShortCaseLabelsOnASingleLine: 'true'
 | 
			
		||||
AllowShortFunctionsOnASingleLine: Inline
 | 
			
		||||
AllowShortIfStatementsOnASingleLine: Never
 | 
			
		||||
AlwaysBreakTemplateDeclarations: 'Yes'
 | 
			
		||||
BinPackArguments: 'false'
 | 
			
		||||
BinPackParameters: 'false'
 | 
			
		||||
BreakBeforeBinaryOperators: None
 | 
			
		||||
BreakBeforeBraces: Stroustrup
 | 
			
		||||
BreakBeforeTernaryOperators: 'false'
 | 
			
		||||
BreakConstructorInitializers: AfterColon
 | 
			
		||||
BreakInheritanceList: AfterColon
 | 
			
		||||
BreakStringLiterals: 'true'
 | 
			
		||||
ColumnLimit: '100'
 | 
			
		||||
CompactNamespaces: 'true'
 | 
			
		||||
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
 | 
			
		||||
ConstructorInitializerIndentWidth: '4'
 | 
			
		||||
ContinuationIndentWidth: '4'
 | 
			
		||||
Cpp11BracedListStyle: 'true'
 | 
			
		||||
DerivePointerAlignment: 'false'
 | 
			
		||||
DisableFormat: 'false'
 | 
			
		||||
FixNamespaceComments: 'true'
 | 
			
		||||
IncludeBlocks: Merge
 | 
			
		||||
IndentCaseLabels: 'true'
 | 
			
		||||
IndentWidth: '4'
 | 
			
		||||
IndentWrappedFunctionNames: 'false'
 | 
			
		||||
KeepEmptyLinesAtTheStartOfBlocks: 'true'
 | 
			
		||||
Language: Cpp
 | 
			
		||||
NamespaceIndentation: None
 | 
			
		||||
PointerAlignment: Left
 | 
			
		||||
ReflowComments: 'true'
 | 
			
		||||
SortIncludes: 'true'
 | 
			
		||||
SortUsingDeclarations: 'true'
 | 
			
		||||
SpaceAfterCStyleCast: 'true'
 | 
			
		||||
SpaceAfterLogicalNot: 'false'
 | 
			
		||||
SpaceAfterTemplateKeyword: 'false'
 | 
			
		||||
SpaceBeforeAssignmentOperators: 'true'
 | 
			
		||||
SpaceBeforeCpp11BracedList: 'true'
 | 
			
		||||
SpaceBeforeCtorInitializerColon: 'false'
 | 
			
		||||
SpaceBeforeInheritanceColon: 'false'
 | 
			
		||||
SpaceBeforeParens: ControlStatements
 | 
			
		||||
SpaceBeforeRangeBasedForLoopColon: 'true'
 | 
			
		||||
SpacesInAngles: 'false'
 | 
			
		||||
SpacesInCStyleCastParentheses: 'false'
 | 
			
		||||
SpacesInContainerLiterals: 'false'
 | 
			
		||||
SpacesInParentheses: 'false'
 | 
			
		||||
SpacesInSquareBrackets: 'false'
 | 
			
		||||
Standard: Cpp11
 | 
			
		||||
UseTab: ForContinuationAndIndentation
 | 
			
		||||
 | 
			
		||||
...
 | 
			
		||||
							
								
								
									
										98
									
								
								results.csv
									
									
									
									
									
								
							
							
						
						
									
										98
									
								
								results.csv
									
									
									
									
									
								
							@@ -350,4 +350,100 @@ int_delete, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::
 | 
			
		||||
int_insert, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 367, 298, 336, 354, 361, 376, 371, 370, 366, 382, 402, 386, 399, 397
 | 
			
		||||
int_succ_lookup, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 299, 242, 270, 282, 299, 292, 303, 417, 328, 316, 317, 316, 331, 362
 | 
			
		||||
int_nosucc_lookup, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 757, 1204, 1897, 2121, 2788, 382, 3596, 390, 405, 6269, 409, 412, 9452, 405
 | 
			
		||||
int_delete, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 402, 320, 330, 359, 366, 378, 384, 378, 373, 407, 389, 397, 410, 452
 | 
			
		||||
int_delete, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 402, 320, 330, 359, 366, 378, 384, 378, 373, 407, 389, 397, 410, 452
 | 
			
		||||
int_insert, 'std::unordered_map<int, int>', 110, 172, 200, 380, 242, 228, 248, 237, 248, 269, 255, 255, 263, 264
 | 
			
		||||
int_succ_lookup, 'std::unordered_map<int, int>', 41, 73, 92, 113, 104, 110, 115, 119, 117, 120, 125, 127, 127, 125
 | 
			
		||||
int_nosucc_lookup, 'std::unordered_map<int, int>', 262, 1061, 1170, 1784, 1998, 265, 2813, 247, 252, 4906, 266, 265, 7337, 267
 | 
			
		||||
int_delete, 'std::unordered_map<int, int>', 93, 213, 211, 340, 274, 288, 291, 280, 299, 313, 312, 306, 323, 314
 | 
			
		||||
int_insert, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 459, 298, 394, 339, 352, 341, 352, 365, 400, 410, 414, 429, 423, 415
 | 
			
		||||
int_succ_lookup, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 199, 229, 303, 270, 277, 277, 288, 493, 291, 297, 309, 293, 317, 305
 | 
			
		||||
int_nosucc_lookup, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 1010, 1235, 2232, 2063, 2661, 320, 3648, 622, 368, 6618, 381, 379, 9892, 391
 | 
			
		||||
int_delete, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 351, 310, 385, 351, 362, 357, 450, 383, 382, 390, 385, 378, 397, 395
 | 
			
		||||
int_insert, 'google::sparse_hash_map<int, int>', 193, 191, 170, 193, 167, 186, 216, 260, 242, 279, 305, 360, 300, 299
 | 
			
		||||
int_succ_lookup, 'google::sparse_hash_map<int, int>', 52, 52, 52, 61, 55, 62, 71, 81, 82, 98, 103, 116, 110, 112
 | 
			
		||||
int_nosucc_lookup, 'google::sparse_hash_map<int, int>', 818, 804, 192, 1513, 429, 221, 215, 301, 231, 261, 311, 352, 279, 294
 | 
			
		||||
int_delete, 'google::sparse_hash_map<int, int>', 166, 53, 88, 71, 150, 82, 82, 108, 90, 100, 115, 130, 114, 120
 | 
			
		||||
int_insert, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 1039, 1294, 1163, 1621, 1136, 1284, 1461, 1594, 1324, 1396, 1634, 1713, 1197, 1277
 | 
			
		||||
int_succ_lookup, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 133, 155, 152, 184, 160, 173, 183, 201, 187, 194, 230, 222, 204, 211
 | 
			
		||||
int_nosucc_lookup, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 2566, 3995, 1239, 7206, 1150, 1298, 1474, 1638, 1299, 1477, 1606, 1714, 1187, 1291
 | 
			
		||||
int_delete, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 126, 152, 178, 169, 174, 189, 216, 228, 222, 227, 241, 252, 221, 237
 | 
			
		||||
int_insert, 'google::dense_hash_map<int, int>', 19, 54, 36, 39, 39, 37, 38, 41, 51, 41, 42, 46, 48, 54
 | 
			
		||||
int_succ_lookup, 'google::dense_hash_map<int, int>', 10, 34, 18, 25, 21, 21, 23, 24, 24, 25, 23, 24, 24, 26
 | 
			
		||||
int_nosucc_lookup, 'google::dense_hash_map<int, int>', 25, 82, 33, 40, 42, 37, 39, 43, 52, 41, 42, 46, 58, 57
 | 
			
		||||
int_delete, 'google::dense_hash_map<int, int>', 10, 43, 11, 15, 15, 12, 13, 14, 19, 14, 14, 16, 23, 22
 | 
			
		||||
int_insert, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 203, 185, 175, 177, 194, 174, 187, 265, 201, 193, 195, 201, 208, 215
 | 
			
		||||
int_succ_lookup, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 85, 109, 95, 101, 126, 102, 106, 112, 113, 109, 115, 116, 122, 123
 | 
			
		||||
int_nosucc_lookup, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 180, 233, 178, 197, 196, 182, 192, 195, 199, 191, 205, 206, 207, 214
 | 
			
		||||
int_delete, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 189, 110, 99, 100, 125, 96, 108, 107, 114, 104, 113, 113, 119, 124
 | 
			
		||||
int_insert, 'absl::node_hash_map<int, int>', 75, 70, 118, 97, 98, 99, 102, 108, 113, 125, 120, 126, 139, 131
 | 
			
		||||
int_succ_lookup, 'absl::node_hash_map<int, int>', 27, 32, 45, 43, 51, 52, 53, 54, 63, 64, 64, 64, 66, 73
 | 
			
		||||
int_nosucc_lookup, 'absl::node_hash_map<int, int>', 367, 76, 91, 96, 98, 100, 103, 110, 115, 117, 128, 123, 142, 135
 | 
			
		||||
int_delete, 'absl::node_hash_map<int, int>', 117, 89, 115, 119, 136, 141, 150, 147, 180, 184, 198, 194, 189, 227
 | 
			
		||||
int_insert, 'absl::node_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 140, 170, 162, 195, 200, 204, 212, 217, 223, 219, 229, 239, 269, 237
 | 
			
		||||
int_succ_lookup, 'absl::node_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 109, 151, 164, 178, 206, 207, 207, 207, 234, 242, 237, 248, 245, 275
 | 
			
		||||
int_nosucc_lookup, 'absl::node_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 738, 159, 122, 157, 168, 168, 181, 184, 189, 190, 204, 212, 231, 221
 | 
			
		||||
int_delete, 'absl::node_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 156, 167, 157, 188, 218, 220, 219, 228, 259, 250, 260, 259, 274, 296
 | 
			
		||||
int_insert, 'absl::flat_hash_map<int, int>', 44, 50, 62, 86, 42, 41, 77, 45, 52, 51, 52, 61, 71, 70
 | 
			
		||||
int_succ_lookup, 'absl::flat_hash_map<int, int>', 23, 32, 47, 60, 27, 30, 35, 27, 34, 40, 34, 36, 36, 45
 | 
			
		||||
int_nosucc_lookup, 'absl::flat_hash_map<int, int>', 191, 63, 65, 59, 50, 50, 59, 52, 60, 63, 65, 71, 76, 80
 | 
			
		||||
int_delete, 'absl::flat_hash_map<int, int>', 59, 53, 76, 40, 27, 30, 64, 31, 40, 43, 43, 44, 44, 82
 | 
			
		||||
int_insert, 'absl::flat_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 223, 167, 174, 181, 194, 187, 190, 198, 220, 217, 224, 235, 251, 251
 | 
			
		||||
int_succ_lookup, 'absl::flat_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 102, 111, 117, 119, 133, 136, 131, 135, 167, 160, 166, 166, 160, 187
 | 
			
		||||
int_nosucc_lookup, 'absl::flat_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 385, 146, 143, 152, 151, 155, 151, 160, 176, 181, 188, 189, 207, 206
 | 
			
		||||
int_delete, 'absl::flat_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 108, 85, 96, 98, 113, 122, 121, 117, 151, 152, 153, 153, 156, 191
 | 
			
		||||
int_insert, 'tsl::sparse_map<int, int>', 68, 118, 83, 106, 117, 137, 140, 120, 162, 165, 150, 179, 190, 170
 | 
			
		||||
int_succ_lookup, 'tsl::sparse_map<int, int>', 12, 19, 18, 25, 28, 31, 33, 32, 40, 43, 42, 46, 49, 49
 | 
			
		||||
int_nosucc_lookup, 'tsl::sparse_map<int, int>', 68, 75, 72, 108, 100, 101, 110, 114, 137, 133, 145, 151, 157, 173
 | 
			
		||||
int_delete, 'tsl::sparse_map<int, int>', 32, 36, 50, 45, 50, 53, 55, 63, 74, 80, 82, 87, 95, 100
 | 
			
		||||
int_insert, 'tsl::sparse_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 450, 455, 419, 525, 751, 467, 516, 558, 662, 501, 554, 602, 659, 705
 | 
			
		||||
int_succ_lookup, 'tsl::sparse_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 65, 101, 115, 123, 165, 139, 144, 145, 154, 157, 161, 166, 169, 178
 | 
			
		||||
int_nosucc_lookup, 'tsl::sparse_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 372, 461, 420, 508, 752, 463, 513, 557, 646, 510, 549, 590, 631, 690
 | 
			
		||||
int_delete, 'tsl::sparse_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 235, 307, 303, 395, 499, 326, 353, 387, 449, 352, 381, 420, 445, 481
 | 
			
		||||
int_insert, 'std::unordered_map<int, int>', 277, 273, 175, 204, 215, 220, 240, 239, 244, 255, 266, 253, 296, 262
 | 
			
		||||
int_succ_lookup, 'std::unordered_map<int, int>', 157, 96, 87, 101, 104, 108, 114, 118, 121, 123, 128, 127, 143, 123
 | 
			
		||||
int_nosucc_lookup, 'std::unordered_map<int, int>', 673, 1051, 1167, 1513, 1978, 230, 2820, 250, 252, 5031, 259, 263, 8838, 265
 | 
			
		||||
int_delete, 'std::unordered_map<int, int>', 340, 190, 211, 249, 271, 263, 294, 286, 296, 318, 307, 314, 325, 318
 | 
			
		||||
int_insert, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 407, 367, 325, 332, 346, 335, 351, 365, 401, 403, 407, 407, 426, 417
 | 
			
		||||
int_succ_lookup, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 186, 281, 259, 298, 278, 273, 287, 330, 286, 291, 290, 293, 298, 294
 | 
			
		||||
int_nosucc_lookup, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 634, 1464, 1767, 2215, 2714, 322, 3668, 500, 367, 6579, 369, 378, 10120, 395
 | 
			
		||||
int_delete, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 387, 368, 390, 370, 356, 366, 453, 475, 369, 532, 397, 378, 402, 381
 | 
			
		||||
int_insert, 'google::sparse_hash_map<int, int>', 359, 210, 166, 202, 176, 203, 227, 555, 266, 459, 317, 364, 289, 306
 | 
			
		||||
int_succ_lookup, 'google::sparse_hash_map<int, int>', 72, 50, 43, 52, 54, 60, 69, 151, 88, 136, 106, 114, 104, 106
 | 
			
		||||
int_nosucc_lookup, 'google::sparse_hash_map<int, int>', 610, 782, 167, 1429, 182, 198, 227, 582, 244, 386, 312, 496, 280, 304
 | 
			
		||||
int_delete, 'google::sparse_hash_map<int, int>', 66, 50, 56, 55, 62, 67, 79, 175, 88, 110, 111, 128, 113, 117
 | 
			
		||||
int_insert, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 1240, 1305, 1183, 1518, 1137, 1302, 1499, 1659, 1264, 1444, 1539, 1772, 1219, 1327
 | 
			
		||||
int_succ_lookup, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 162, 153, 148, 177, 159, 167, 183, 205, 177, 190, 198, 215, 194, 205
 | 
			
		||||
int_nosucc_lookup, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 2954, 4031, 1220, 7357, 1175, 1323, 1491, 1688, 1248, 1394, 1603, 1729, 1222, 1312
 | 
			
		||||
int_delete, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 125, 152, 176, 170, 285, 188, 213, 232, 197, 209, 226, 254, 220, 222
 | 
			
		||||
int_insert, 'google::dense_hash_map<int, int>', 31, 89, 38, 34, 41, 37, 41, 43, 50, 40, 44, 46, 52, 57
 | 
			
		||||
int_succ_lookup, 'google::dense_hash_map<int, int>', 12, 29, 21, 18, 20, 21, 22, 23, 25, 26, 25, 26, 26, 27
 | 
			
		||||
int_nosucc_lookup, 'google::dense_hash_map<int, int>', 29, 66, 37, 38, 46, 38, 42, 47, 53, 41, 45, 51, 52, 57
 | 
			
		||||
int_delete, 'google::dense_hash_map<int, int>', 10, 30, 18, 16, 16, 12, 13, 15, 19, 14, 14, 18, 18, 22
 | 
			
		||||
int_insert, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 224, 169, 165, 182, 194, 171, 271, 194, 204, 192, 200, 200, 207, 214
 | 
			
		||||
int_succ_lookup, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 195, 112, 97, 106, 108, 103, 113, 122, 116, 111, 114, 118, 121, 124
 | 
			
		||||
int_nosucc_lookup, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 239, 215, 164, 182, 186, 178, 183, 196, 192, 176, 184, 192, 196, 205
 | 
			
		||||
int_delete, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >', 106, 117, 89, 104, 113, 98, 136, 129, 121, 103, 109, 120, 128, 131
 | 
			
		||||
int_insert, 'std::unordered_map<int, int, absl::hash_internal::Hash<int> >', 188, 274, 205, 215, 229, 223, 241, 251, 252, 265, 261, 268, 310, 269
 | 
			
		||||
int_succ_lookup, 'std::unordered_map<int, int, absl::hash_internal::Hash<int> >', 83, 192, 104, 113, 124, 131, 135, 135, 138, 141, 148, 146, 158, 150
 | 
			
		||||
int_nosucc_lookup, 'std::unordered_map<int, int, absl::hash_internal::Hash<int> >', 471, 1328, 1219, 1554, 2042, 236, 3124, 244, 252, 5144, 265, 267, 8807, 266
 | 
			
		||||
int_delete, 'std::unordered_map<int, int, absl::hash_internal::Hash<int> >', 201, 409, 233, 257, 274, 264, 309, 290, 298, 326, 307, 315, 335, 318
 | 
			
		||||
int_insert, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 245, 309, 326, 352, 367, 361, 372, 483, 486, 422, 420, 425, 443, 436
 | 
			
		||||
int_succ_lookup, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 173, 236, 263, 271, 281, 275, 283, 332, 295, 305, 313, 320, 323, 324
 | 
			
		||||
int_nosucc_lookup, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 913, 1162, 1794, 2201, 2727, 321, 3651, 456, 453, 6701, 405, 408, 10189, 407
 | 
			
		||||
int_delete, 'std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 437, 308, 335, 560, 373, 356, 383, 449, 475, 407, 402, 407, 422, 415
 | 
			
		||||
int_insert, 'google::sparse_hash_map<int, int, absl::hash_internal::Hash<int> >', 189, 187, 155, 199, 167, 190, 233, 301, 250, 298, 324, 522, 276, 525
 | 
			
		||||
int_succ_lookup, 'google::sparse_hash_map<int, int, absl::hash_internal::Hash<int> >', 55, 48, 44, 56, 51, 59, 73, 94, 85, 101, 111, 153, 106, 169
 | 
			
		||||
int_nosucc_lookup, 'google::sparse_hash_map<int, int, absl::hash_internal::Hash<int> >', 722, 818, 158, 1500, 174, 196, 241, 305, 251, 281, 330, 389, 275, 518
 | 
			
		||||
int_delete, 'google::sparse_hash_map<int, int, absl::hash_internal::Hash<int> >', 53, 51, 58, 59, 64, 74, 89, 104, 98, 109, 125, 132, 116, 188
 | 
			
		||||
int_insert, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 1022, 1255, 1158, 1632, 1146, 1482, 1449, 1630, 1255, 1397, 1532, 1728, 1209, 1302
 | 
			
		||||
int_succ_lookup, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 109, 158, 155, 183, 157, 186, 187, 196, 178, 189, 196, 212, 199, 202
 | 
			
		||||
int_nosucc_lookup, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 2319, 3951, 1258, 7297, 1179, 1493, 1497, 1649, 1270, 1434, 1571, 1736, 1236, 1315
 | 
			
		||||
int_delete, 'google::sparse_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 128, 148, 175, 173, 190, 219, 215, 242, 208, 215, 233, 256, 229, 236
 | 
			
		||||
int_insert, 'google::dense_hash_map<int, int, absl::hash_internal::Hash<int> >', 21, 118, 41, 40, 45, 43, 43, 45, 54, 47, 46, 51, 55, 60
 | 
			
		||||
int_succ_lookup, 'google::dense_hash_map<int, int, absl::hash_internal::Hash<int> >', 11, 57, 26, 21, 22, 25, 25, 28, 28, 28, 28, 30, 31, 31
 | 
			
		||||
int_nosucc_lookup, 'google::dense_hash_map<int, int, absl::hash_internal::Hash<int> >', 25, 103, 87, 41, 48, 46, 49, 51, 58, 51, 55, 57, 62, 63
 | 
			
		||||
int_delete, 'google::dense_hash_map<int, int, absl::hash_internal::Hash<int> >', 10, 44, 59, 12, 16, 13, 14, 15, 20, 15, 15, 16, 20, 32
 | 
			
		||||
int_insert, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 159, 176, 161, 169, 190, 170, 177, 190, 200, 188, 193, 198, 203, 210
 | 
			
		||||
int_succ_lookup, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 126, 106, 96, 102, 107, 101, 105, 115, 113, 112, 112, 122, 118, 121
 | 
			
		||||
int_nosucc_lookup, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 292, 201, 160, 178, 182, 166, 177, 192, 189, 178, 182, 189, 195, 203
 | 
			
		||||
int_delete, 'google::dense_hash_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, absl::hash_internal::Hash<std::__cxx11::basic_string<char> > >', 142, 112, 99, 104, 113, 110, 112, 122, 121, 119, 115, 134, 132, 137
 | 
			
		||||
| 
		
		
			 Can't render this file because it has a wrong number of fields in line 242. 
		
	 | 
							
								
								
									
										62
									
								
								src/clang-format
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								src/clang-format
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
---
 | 
			
		||||
BasedOnStyle: WebKit
 | 
			
		||||
AccessModifierOffset: '0'
 | 
			
		||||
AlignAfterOpenBracket: Align
 | 
			
		||||
AlignConsecutiveMacros: 'true'
 | 
			
		||||
AlignConsecutiveAssignments: 'true'
 | 
			
		||||
AlignEscapedNewlines: Left
 | 
			
		||||
AlignTrailingComments: 'true'
 | 
			
		||||
AllowAllArgumentsOnNextLine: 'true'
 | 
			
		||||
AllowAllConstructorInitializersOnNextLine: 'true'
 | 
			
		||||
AllowAllParametersOfDeclarationOnNextLine: 'true'
 | 
			
		||||
AllowShortBlocksOnASingleLine: 'true'
 | 
			
		||||
AllowShortCaseLabelsOnASingleLine: 'true'
 | 
			
		||||
AllowShortFunctionsOnASingleLine: Inline
 | 
			
		||||
AllowShortIfStatementsOnASingleLine: Never
 | 
			
		||||
AlwaysBreakTemplateDeclarations: 'Yes'
 | 
			
		||||
BinPackArguments: 'false'
 | 
			
		||||
BinPackParameters: 'false'
 | 
			
		||||
BreakBeforeBinaryOperators: None
 | 
			
		||||
BreakBeforeBraces: Stroustrup
 | 
			
		||||
BreakBeforeTernaryOperators: 'false'
 | 
			
		||||
BreakConstructorInitializers: AfterColon
 | 
			
		||||
BreakInheritanceList: AfterColon
 | 
			
		||||
BreakStringLiterals: 'true'
 | 
			
		||||
ColumnLimit: '100'
 | 
			
		||||
CompactNamespaces: 'true'
 | 
			
		||||
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
 | 
			
		||||
ConstructorInitializerIndentWidth: '4'
 | 
			
		||||
ContinuationIndentWidth: '4'
 | 
			
		||||
Cpp11BracedListStyle: 'true'
 | 
			
		||||
DerivePointerAlignment: 'false'
 | 
			
		||||
DisableFormat: 'false'
 | 
			
		||||
FixNamespaceComments: 'true'
 | 
			
		||||
IncludeBlocks: Merge
 | 
			
		||||
IndentCaseLabels: 'true'
 | 
			
		||||
IndentWidth: '4'
 | 
			
		||||
IndentWrappedFunctionNames: 'false'
 | 
			
		||||
KeepEmptyLinesAtTheStartOfBlocks: 'true'
 | 
			
		||||
Language: Cpp
 | 
			
		||||
NamespaceIndentation: None
 | 
			
		||||
PointerAlignment: Left
 | 
			
		||||
ReflowComments: 'true'
 | 
			
		||||
SortIncludes: 'true'
 | 
			
		||||
SortUsingDeclarations: 'true'
 | 
			
		||||
SpaceAfterCStyleCast: 'true'
 | 
			
		||||
SpaceAfterLogicalNot: 'false'
 | 
			
		||||
SpaceAfterTemplateKeyword: 'false'
 | 
			
		||||
SpaceBeforeAssignmentOperators: 'true'
 | 
			
		||||
SpaceBeforeCpp11BracedList: 'true'
 | 
			
		||||
SpaceBeforeCtorInitializerColon: 'false'
 | 
			
		||||
SpaceBeforeInheritanceColon: 'false'
 | 
			
		||||
SpaceBeforeParens: ControlStatements
 | 
			
		||||
SpaceBeforeRangeBasedForLoopColon: 'true'
 | 
			
		||||
SpacesInAngles: 'false'
 | 
			
		||||
SpacesInCStyleCastParentheses: 'false'
 | 
			
		||||
SpacesInContainerLiterals: 'false'
 | 
			
		||||
SpacesInParentheses: 'false'
 | 
			
		||||
SpacesInSquareBrackets: 'false'
 | 
			
		||||
Standard: Cpp11
 | 
			
		||||
UseTab: ForContinuationAndIndentation
 | 
			
		||||
 | 
			
		||||
...
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
#include "./includes/generator.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -18,10 +18,10 @@ std::string gen_unsuccesfull_string() { // 90^size posibilities
 | 
			
		||||
    return randomstring;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int gen_int(){
 | 
			
		||||
int gen_int() {
 | 
			
		||||
    return insert_int(generator);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int gen_unsuccesfull_int(){
 | 
			
		||||
int gen_unsuccesfull_int() {
 | 
			
		||||
    return noninsert_int(generator);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8223
									
								
								src/includes/3thparty/CLI11.hpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8223
									
								
								src/includes/3thparty/CLI11.hpp
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -5,16 +5,15 @@
 | 
			
		||||
#include "./tests.h"
 | 
			
		||||
 | 
			
		||||
vector<int> sizes = {
 | 
			
		||||
    50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 500000, 
 | 
			
		||||
    600000, 700000, 800000, 900000, 1000000,
 | 
			
		||||
    // 2000000, 3000000, 4000000, 5000000, 6000000, 7000000, 8000000, 9000000, 10000000,
 | 
			
		||||
    // 15000000, 20000000, 25000000, 30000000, 35000000, 40000000, 45000000, 50000000
 | 
			
		||||
        50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 500000,
 | 
			
		||||
        600000, 700000, 800000, 900000, 1000000,
 | 
			
		||||
        // 2000000, 3000000, 4000000, 5000000, 6000000, 7000000, 8000000, 9000000, 10000000,
 | 
			
		||||
        // 15000000, 20000000, 25000000, 30000000, 35000000, 40000000, 45000000, 50000000
 | 
			
		||||
};
 | 
			
		||||
// to print type info
 | 
			
		||||
 | 
			
		||||
template <typename T>
 | 
			
		||||
constexpr auto type_name()
 | 
			
		||||
{
 | 
			
		||||
template<typename T>
 | 
			
		||||
constexpr auto type_name() {
 | 
			
		||||
    std::string_view name, prefix, suffix;
 | 
			
		||||
#ifdef __clang__
 | 
			
		||||
    name = __PRETTY_FUNCTION__;
 | 
			
		||||
@@ -32,73 +31,70 @@ constexpr auto type_name()
 | 
			
		||||
    name.remove_prefix(prefix.size());
 | 
			
		||||
    name.remove_suffix(suffix.size());
 | 
			
		||||
    return name;
 | 
			
		||||
}   
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
template<class T>
 | 
			
		||||
std::basic_string_view<char> name(T var){
 | 
			
		||||
std::basic_string_view<char> name(T var) {
 | 
			
		||||
    return type_name<decltype(var)>();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
template<class T>
 | 
			
		||||
void int_test_aggregate(T map, int runs){
 | 
			
		||||
void int_test_aggregate(T map, int runs) {
 | 
			
		||||
    std::ofstream output{"results.csv", std::ios_base::app};
 | 
			
		||||
    for (int i = 0; i < runs; ++i){
 | 
			
		||||
    for (int i = 0; i < runs; ++i) {
 | 
			
		||||
        string insert = "\nint_insert, '";
 | 
			
		||||
        string succ_lookup = "\nint_succ_lookup, '";
 | 
			
		||||
        string nosucc_lookup = "\nint_nosucc_lookup, '";
 | 
			
		||||
        string delet = "\nint_delete, '";
 | 
			
		||||
 | 
			
		||||
        insert += string{name(map)} + "'"; 
 | 
			
		||||
        succ_lookup += string{name(map)} + "'" ;
 | 
			
		||||
        nosucc_lookup += string{name(map)} +"'" ;
 | 
			
		||||
        delet += string{name(map)} + "'" ;
 | 
			
		||||
        for ( auto size : sizes){
 | 
			
		||||
        insert += string{name(map)} + "'";
 | 
			
		||||
        succ_lookup += string{name(map)} + "'";
 | 
			
		||||
        nosucc_lookup += string{name(map)} + "'";
 | 
			
		||||
        delet += string{name(map)} + "'";
 | 
			
		||||
        for (auto size : sizes) {
 | 
			
		||||
            vector<int> results = int_test(map, size);
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            insert += ", " + std::to_string(results[0]);
 | 
			
		||||
            succ_lookup += ", " + std::to_string(results[1]);
 | 
			
		||||
            nosucc_lookup +=", " + std::to_string(results[2]);
 | 
			
		||||
            nosucc_lookup += ", " + std::to_string(results[2]);
 | 
			
		||||
            delet += ", " + std::to_string(results[3]);
 | 
			
		||||
        }
 | 
			
		||||
        output << insert << succ_lookup << nosucc_lookup  << delet;
 | 
			
		||||
        cout << insert << succ_lookup << nosucc_lookup  << delet;
 | 
			
		||||
        
 | 
			
		||||
        output << insert << succ_lookup << nosucc_lookup << delet;
 | 
			
		||||
        cout << insert << succ_lookup << nosucc_lookup << delet;
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
template<class T>
 | 
			
		||||
void string_test_aggregate(T map, int runs){
 | 
			
		||||
void string_test_aggregate(T map, int runs) {
 | 
			
		||||
    std::ofstream output{"results.csv", std::ios_base::app};
 | 
			
		||||
    for (int i = 0; i < runs; ++i){
 | 
			
		||||
    for (int i = 0; i < runs; ++i) {
 | 
			
		||||
        string insert = "\nint_insert, '";
 | 
			
		||||
        string succ_lookup = "\nint_succ_lookup, '";
 | 
			
		||||
        string nosucc_lookup = "\nint_nosucc_lookup, '";
 | 
			
		||||
        string delet = "\nint_delete, '";
 | 
			
		||||
 | 
			
		||||
        insert += string{name(map)} + "'"; 
 | 
			
		||||
        succ_lookup += string{name(map)} + "'" ;
 | 
			
		||||
        nosucc_lookup += string{name(map)} +"'" ;
 | 
			
		||||
        delet += string{name(map)} + "'" ;
 | 
			
		||||
        for ( auto size : sizes){
 | 
			
		||||
        insert += string{name(map)} + "'";
 | 
			
		||||
        succ_lookup += string{name(map)} + "'";
 | 
			
		||||
        nosucc_lookup += string{name(map)} + "'";
 | 
			
		||||
        delet += string{name(map)} + "'";
 | 
			
		||||
        for (auto size : sizes) {
 | 
			
		||||
            vector<int> results = string_test(map, size);
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
            insert += ", " + std::to_string(results[0]);
 | 
			
		||||
            succ_lookup += ", " + std::to_string(results[1]);
 | 
			
		||||
            nosucc_lookup +=", " + std::to_string(results[2]);
 | 
			
		||||
            nosucc_lookup += ", " + std::to_string(results[2]);
 | 
			
		||||
            delet += ", " + std::to_string(results[3]);
 | 
			
		||||
        }
 | 
			
		||||
        output << insert << succ_lookup << nosucc_lookup  << delet;
 | 
			
		||||
        cout << insert << succ_lookup << nosucc_lookup  << delet;
 | 
			
		||||
        output << insert << succ_lookup << nosucc_lookup << delet;
 | 
			
		||||
        cout << insert << succ_lookup << nosucc_lookup << delet;
 | 
			
		||||
    }
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif 
 | 
			
		||||
#endif
 | 
			
		||||
@@ -3,10 +3,9 @@
 | 
			
		||||
#define GENERATOR_H
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <random>
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
static std::mt19937 generator(INT32_MAX - 2020);
 | 
			
		||||
static std::uniform_int_distribution<int> insert_int(1, INT32_MAX * 0.875);
 | 
			
		||||
static std::uniform_int_distribution<int> noninsert_int(INT32_MAX * 0.875, INT32_MAX);
 | 
			
		||||
@@ -14,11 +13,12 @@ static std::uniform_int_distribution<int> singlechar(33, 123);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int gen_int();
 | 
			
		||||
 | 
			
		||||
int gen_unsuccesfull_int();
 | 
			
		||||
 | 
			
		||||
std::string gen_string();
 | 
			
		||||
 | 
			
		||||
std::string gen_unsuccesfull_string();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /* GENERATOR_H */
 | 
			
		||||
@@ -24,27 +24,48 @@
 | 
			
		||||
#include "./3thparty/parallel_hashmap/phmap.h"
 | 
			
		||||
#include "./3thparty/emilib/hash_map.hpp"
 | 
			
		||||
#include "3thparty/robinhood/robin_hood.h"
 | 
			
		||||
#include <type_traits>
 | 
			
		||||
 | 
			
		||||
using std::string;
 | 
			
		||||
using absl::Hash; 
 | 
			
		||||
using absl::Hash;
 | 
			
		||||
 | 
			
		||||
template<class T>
 | 
			
		||||
void prepare(T& map, int size){
 | 
			
		||||
void prepare(T& map, int size) {
 | 
			
		||||
    map.reserve(size);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void prepare(google::sparse_hash_map<int, int>& map, int size){
 | 
			
		||||
    map.set_deleted_key(-1); 
 | 
			
		||||
void prepare(google::sparse_hash_map<int, int>& map, int size) {
 | 
			
		||||
    map.set_deleted_key(-1);
 | 
			
		||||
}
 | 
			
		||||
void prepare(google::sparse_hash_map<string, string>& map, int size){
 | 
			
		||||
 | 
			
		||||
void prepare(google::sparse_hash_map<string, string>& map, int size) {
 | 
			
		||||
    map.set_deleted_key("a");
 | 
			
		||||
}
 | 
			
		||||
void prepare(google::dense_hash_map<int, int>& map, int size){
 | 
			
		||||
 | 
			
		||||
void prepare(google::dense_hash_map<int, int>& map, int size) {
 | 
			
		||||
    map.set_empty_key(0);
 | 
			
		||||
    map.set_deleted_key(-1);
 | 
			
		||||
}
 | 
			
		||||
void prepare(google::dense_hash_map<string, string>& map, int size){
 | 
			
		||||
 | 
			
		||||
void prepare(google::dense_hash_map<string, string>& map, int size) {
 | 
			
		||||
    map.set_deleted_key("a");
 | 
			
		||||
    map.set_empty_key("");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// with abseil hash
 | 
			
		||||
void prepare(google::sparse_hash_map<int, int, Hash<int>>& map, int size) {
 | 
			
		||||
    map.set_deleted_key(-1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void prepare(google::sparse_hash_map<string, string, Hash<string>>& map, int size) {
 | 
			
		||||
    map.set_deleted_key("a");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void prepare(google::dense_hash_map<int, int, Hash<int>>& map, int size) {
 | 
			
		||||
    map.set_empty_key(0);
 | 
			
		||||
    map.set_deleted_key(-1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void prepare(google::dense_hash_map<string, string, Hash<string>>& map, int size) {
 | 
			
		||||
    map.set_deleted_key("a");
 | 
			
		||||
    map.set_empty_key("");
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -19,8 +19,8 @@ using std::vector;
 | 
			
		||||
using std::cout;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
template <class T>
 | 
			
		||||
vector<int> int_test(T map, int size){
 | 
			
		||||
template<class T>
 | 
			
		||||
vector<int> int_test(T map, int size) {
 | 
			
		||||
    vector<int> results; // insert, lookup, unsuccesful lookup, delete times
 | 
			
		||||
    vector<int> sample_keys; // get a sample of keys to lookup and later delete
 | 
			
		||||
 | 
			
		||||
@@ -36,21 +36,21 @@ vector<int> int_test(T map, int size){
 | 
			
		||||
    prepare(testmap, size); // do special actions, such as setting the tombstone marker for other, more exotic hashmaps
 | 
			
		||||
 | 
			
		||||
    { // seperate scope, so all_keys gets destroyed. for good measure, empty it too
 | 
			
		||||
    vector<int> all_keys(size - 10000);
 | 
			
		||||
    std::generate(all_keys.begin(), all_keys.end(), gen_int);
 | 
			
		||||
    std::sample(all_keys.begin(), all_keys.end(), std::back_inserter(sample_keys), 10000, generator);
 | 
			
		||||
        vector<int> all_keys(size - 10000);
 | 
			
		||||
        std::generate(all_keys.begin(), all_keys.end(), gen_int);
 | 
			
		||||
        std::sample(all_keys.begin(), all_keys.end(), std::back_inserter(sample_keys), 10000, generator);
 | 
			
		||||
 | 
			
		||||
    for (auto i : all_keys){
 | 
			
		||||
        testmap.insert({i,i});
 | 
			
		||||
    }
 | 
			
		||||
    all_keys.clear();
 | 
			
		||||
        for (auto i : all_keys) {
 | 
			
		||||
            testmap.insert({i, i});
 | 
			
		||||
        }
 | 
			
		||||
        all_keys.clear();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    // testing vector access times to subtract later
 | 
			
		||||
    time_point<steady_clock> vector_start = steady_clock::now();
 | 
			
		||||
    for (auto i : sample_keys){
 | 
			
		||||
        if (i == -1 ) cout << "WTF"; // should never run, is here so loop doesnt get optimized away
 | 
			
		||||
    for (auto i : sample_keys) {
 | 
			
		||||
        if (i == -1) cout << "WTF"; // should never run, is here so loop doesnt get optimized away
 | 
			
		||||
    }
 | 
			
		||||
    time_point<steady_clock> vector_end = steady_clock::now();
 | 
			
		||||
    auto vector_acces_time = duration_cast<nanoseconds>(vector_end - vector_start);
 | 
			
		||||
@@ -58,32 +58,32 @@ vector<int> int_test(T map, int size){
 | 
			
		||||
 | 
			
		||||
    // insertion test
 | 
			
		||||
    time_point<steady_clock> insert_start = steady_clock::now();
 | 
			
		||||
    for (auto key : insert_keys){
 | 
			
		||||
        testmap.insert({key,key});
 | 
			
		||||
    for (auto key : insert_keys) {
 | 
			
		||||
        testmap.insert({key, key});
 | 
			
		||||
    }
 | 
			
		||||
    time_point<steady_clock> insert_end = steady_clock::now();
 | 
			
		||||
 | 
			
		||||
    auto insert_time = (duration_cast<nanoseconds>(insert_end - insert_start) - vector_acces_time) / 10000 ;
 | 
			
		||||
    auto insert_time = (duration_cast<nanoseconds>(insert_end - insert_start) - vector_acces_time) / 10000;
 | 
			
		||||
    results.push_back(insert_time.count());
 | 
			
		||||
    // remove some memory
 | 
			
		||||
    insert_keys.clear();
 | 
			
		||||
 | 
			
		||||
    // lookup test
 | 
			
		||||
    time_point<steady_clock> lookup_start = steady_clock::now();
 | 
			
		||||
    for (auto key : sample_keys){
 | 
			
		||||
        if (testmap[key] == 0) cout << "WTF"; 
 | 
			
		||||
    for (auto key : sample_keys) {
 | 
			
		||||
        if (testmap[key] == 0) cout << "WTF";
 | 
			
		||||
    }
 | 
			
		||||
    time_point<steady_clock> lookup_end = steady_clock::now();
 | 
			
		||||
    auto lookup_time = (duration_cast<nanoseconds>(lookup_end - lookup_start) - vector_acces_time)/10000;
 | 
			
		||||
    auto lookup_time = (duration_cast<nanoseconds>(lookup_end - lookup_start) - vector_acces_time) / 10000;
 | 
			
		||||
    results.push_back(lookup_time.count());
 | 
			
		||||
 | 
			
		||||
    // unsuccesful lookup test
 | 
			
		||||
    time_point<steady_clock> unlookup_start = steady_clock::now();
 | 
			
		||||
    for (auto key : nonkeys){
 | 
			
		||||
        if (testmap[key] == -1) cout << "WTF"; 
 | 
			
		||||
    for (auto key : nonkeys) {
 | 
			
		||||
        if (testmap[key] == -1) cout << "WTF";
 | 
			
		||||
    }
 | 
			
		||||
    time_point<steady_clock> unlookup_end = steady_clock::now();
 | 
			
		||||
    auto unlookup_time = (duration_cast<nanoseconds>(unlookup_end - unlookup_start) - vector_acces_time) / 10000 ;
 | 
			
		||||
    auto unlookup_time = (duration_cast<nanoseconds>(unlookup_end - unlookup_start) - vector_acces_time) / 10000;
 | 
			
		||||
    results.push_back(unlookup_time.count());
 | 
			
		||||
    //free some memoru
 | 
			
		||||
    nonkeys.clear();
 | 
			
		||||
@@ -91,10 +91,10 @@ vector<int> int_test(T map, int size){
 | 
			
		||||
 | 
			
		||||
    // delete test
 | 
			
		||||
    time_point<steady_clock> delete_start = steady_clock::now();
 | 
			
		||||
    for (auto key : sample_keys){
 | 
			
		||||
        testmap.erase(key); 
 | 
			
		||||
    for (auto key : sample_keys) {
 | 
			
		||||
        testmap.erase(key);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    time_point<steady_clock> delete_end = steady_clock::now();
 | 
			
		||||
    auto delete_time = (duration_cast<nanoseconds>(delete_end - delete_start) - vector_acces_time) / 10000;
 | 
			
		||||
    results.push_back(delete_time.count());
 | 
			
		||||
@@ -104,9 +104,8 @@ vector<int> int_test(T map, int size){
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
template <class T>
 | 
			
		||||
vector<int> string_test(T map, int size){
 | 
			
		||||
template<class T>
 | 
			
		||||
vector<int> string_test(T map, int size) {
 | 
			
		||||
    vector<int> results; // insert, lookup, unsuccesful lookup, delete times
 | 
			
		||||
    vector<string> sample_keys; // get a sample of keys to lookup and later delete
 | 
			
		||||
 | 
			
		||||
@@ -123,21 +122,21 @@ vector<int> string_test(T map, int size){
 | 
			
		||||
    prepare(testmap, size); // do special actions, such as setting the tombstone marker for other, more exotic hashmaps
 | 
			
		||||
 | 
			
		||||
    { // seperate scope, so all_keys gets destroyed. for good measure, empty it too
 | 
			
		||||
    vector<string> all_keys(size - 10000);
 | 
			
		||||
    std::generate(all_keys.begin(), all_keys.end(), gen_string);
 | 
			
		||||
    std::sample(all_keys.begin(), all_keys.end(), std::back_inserter(sample_keys), 10000, generator);
 | 
			
		||||
        vector<string> all_keys(size - 10000);
 | 
			
		||||
        std::generate(all_keys.begin(), all_keys.end(), gen_string);
 | 
			
		||||
        std::sample(all_keys.begin(), all_keys.end(), std::back_inserter(sample_keys), 10000, generator);
 | 
			
		||||
 | 
			
		||||
    for (auto i : all_keys){
 | 
			
		||||
        testmap.insert({i,i});
 | 
			
		||||
    }
 | 
			
		||||
    all_keys.clear();
 | 
			
		||||
        for (auto i : all_keys) {
 | 
			
		||||
            testmap.insert({i, i});
 | 
			
		||||
        }
 | 
			
		||||
        all_keys.clear();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    // testing vector access times to subtract later
 | 
			
		||||
    time_point<steady_clock> vector_start = steady_clock::now();
 | 
			
		||||
    for (auto i : sample_keys){
 | 
			
		||||
        if (i == "" ) cout << "WTF"; // should never run, is here so loop doesnt get optimized away
 | 
			
		||||
    for (auto i : sample_keys) {
 | 
			
		||||
        if (i == "") cout << "WTF"; // should never run, is here so loop doesnt get optimized away
 | 
			
		||||
    }
 | 
			
		||||
    time_point<steady_clock> vector_end = steady_clock::now();
 | 
			
		||||
    auto vector_acces_time = duration_cast<nanoseconds>(vector_end - vector_start);
 | 
			
		||||
@@ -145,42 +144,42 @@ vector<int> string_test(T map, int size){
 | 
			
		||||
 | 
			
		||||
    // insertion test
 | 
			
		||||
    time_point<steady_clock> insert_start = steady_clock::now();
 | 
			
		||||
    for (auto key : insert_keys){
 | 
			
		||||
        testmap.insert({key,key});
 | 
			
		||||
    for (auto key : insert_keys) {
 | 
			
		||||
        testmap.insert({key, key});
 | 
			
		||||
    }
 | 
			
		||||
    time_point<steady_clock> insert_end = steady_clock::now();
 | 
			
		||||
 | 
			
		||||
    auto insert_time = (duration_cast<nanoseconds>(insert_end - insert_start) - vector_acces_time) / 10000 ;
 | 
			
		||||
    auto insert_time = (duration_cast<nanoseconds>(insert_end - insert_start) - vector_acces_time) / 10000;
 | 
			
		||||
    results.push_back(insert_time.count());
 | 
			
		||||
    // remove some memory
 | 
			
		||||
    insert_keys.clear();
 | 
			
		||||
 | 
			
		||||
    // lookup test
 | 
			
		||||
    time_point<steady_clock> lookup_start = steady_clock::now();
 | 
			
		||||
    for (auto key : sample_keys){
 | 
			
		||||
        if (testmap[key] == "") cout << "WTF"; 
 | 
			
		||||
    for (auto key : sample_keys) {
 | 
			
		||||
        if (testmap[key] == "") cout << "WTF";
 | 
			
		||||
    }
 | 
			
		||||
    time_point<steady_clock> lookup_end = steady_clock::now();
 | 
			
		||||
    auto lookup_time = (duration_cast<nanoseconds>(lookup_end - lookup_start) - vector_acces_time)/10000;
 | 
			
		||||
    auto lookup_time = (duration_cast<nanoseconds>(lookup_end - lookup_start) - vector_acces_time) / 10000;
 | 
			
		||||
    results.push_back(lookup_time.count());
 | 
			
		||||
 | 
			
		||||
    // unsuccesful lookup test
 | 
			
		||||
    time_point<steady_clock> unlookup_start = steady_clock::now();
 | 
			
		||||
    for (auto key : nonkeys){
 | 
			
		||||
        if (testmap[key] == "a") cout << "WTF"; 
 | 
			
		||||
    for (auto key : nonkeys) {
 | 
			
		||||
        if (testmap[key] == "a") cout << "WTF";
 | 
			
		||||
    }
 | 
			
		||||
    time_point<steady_clock> unlookup_end = steady_clock::now();
 | 
			
		||||
    auto unlookup_time = (duration_cast<nanoseconds>(unlookup_end - unlookup_start) - vector_acces_time) / 10000 ;
 | 
			
		||||
    auto unlookup_time = (duration_cast<nanoseconds>(unlookup_end - unlookup_start) - vector_acces_time) / 10000;
 | 
			
		||||
    results.push_back(unlookup_time.count());
 | 
			
		||||
    //free some memoru
 | 
			
		||||
    nonkeys.clear();
 | 
			
		||||
 | 
			
		||||
    // delete test
 | 
			
		||||
    time_point<steady_clock> delete_start = steady_clock::now();
 | 
			
		||||
    for (auto key : sample_keys){
 | 
			
		||||
        testmap.erase(key); 
 | 
			
		||||
    for (auto key : sample_keys) {
 | 
			
		||||
        testmap.erase(key);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    time_point<steady_clock> delete_end = steady_clock::now();
 | 
			
		||||
    auto delete_time = (duration_cast<nanoseconds>(delete_end - delete_start) - vector_acces_time) / 10000;
 | 
			
		||||
    results.push_back(delete_time.count());
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										284
									
								
								src/main.cpp
									
									
									
									
									
								
							
							
						
						
									
										284
									
								
								src/main.cpp
									
									
									
									
									
								
							@@ -1,114 +1,186 @@
 | 
			
		||||
#include "./includes/3thparty/CLI11.hpp"
 | 
			
		||||
#include "./includes/aggregate_tests.h"
 | 
			
		||||
#include <iostream>
 | 
			
		||||
 | 
			
		||||
// // we can use typedefs and switch statements for the map implementations
 | 
			
		||||
// // we can add some cli handling so we can specify which maps to tests (or all)
 | 
			
		||||
// 3. folly F14ValueMap // lots of dependencies, even tho it really seems cool
 | 
			
		||||
// 4. folly F14NodeMap
 | 
			
		||||
// 5. Tessil/ordered-map [n] something is wrong with this one, verrrrry slow
 | 
			
		||||
// 6. Tessil/array-hash[n] (not with a small modification of the insert function)
 | 
			
		||||
 | 
			
		||||
typedef std::unordered_map<int, int> intmap;
 | 
			
		||||
typedef std::unordered_map<string, string> stringmap;
 | 
			
		||||
string choicetext = "Select implementation to test: '-i 1 2 3 4' or '-i 1,2,3'. Default is all  \n"
 | 
			
		||||
"1. std::unordered_hashmap(1) \n"
 | 
			
		||||
"2. google:: hashmaps(2) \n"
 | 
			
		||||
"3. abseil's absl:: hashmaps(2) \n"
 | 
			
		||||
"4. tessil's tsl:: hashmaps(3) \n"
 | 
			
		||||
"5. boost::unordered_map(1) \n"
 | 
			
		||||
"6. Skarupke ska:: hashmaps(3) \n"
 | 
			
		||||
"7. greg7ndp's  phmap:: hashmaps(2) \n"
 | 
			
		||||
"8. emilk's emilib:: hashmap(1) \n"
 | 
			
		||||
"9. martin's robin_hood:: hashmaps(2) \n";
 | 
			
		||||
 | 
			
		||||
// // google  sparse
 | 
			
		||||
// typedef google::sparse_hash_map<int, int> intmap;
 | 
			
		||||
// typedef google::sparse_hash_map<string,string> stringmap;
 | 
			
		||||
//
 | 
			
		||||
// // google dense
 | 
			
		||||
// typedef google::dense_hash_map<int, int> intmap;
 | 
			
		||||
// typedef google::dense_hash_map<string,string> stringmap;
 | 
			
		||||
// 
 | 
			
		||||
// // abseil nodehashmap
 | 
			
		||||
// typedef absl::node_hash_map<int, int> intmap;
 | 
			
		||||
// typedef absl::node_hash_map<string,string> stringmap;
 | 
			
		||||
//
 | 
			
		||||
// // flat hashmap
 | 
			
		||||
// typedef absl::flat_hash_map<int, int> intmap;
 | 
			
		||||
// typedef absl::flat_hash_map<string,string> stringmap;
 | 
			
		||||
// 
 | 
			
		||||
// // tessil flat hashmap
 | 
			
		||||
// typedef tsl::sparse_map<int, int> intmap;
 | 
			
		||||
// typedef tsl::sparse_map<string,string> stringmap;
 | 
			
		||||
// 
 | 
			
		||||
// // Tessil tsl::array_map
 | 
			
		||||
// typedef tsl::array_map<int, int> intmap;
 | 
			
		||||
// typedef tsl::array_map<string,string> stringmap;
 | 
			
		||||
// 
 | 
			
		||||
// // Tessil tsl::ordered_map
 | 
			
		||||
// typedef tsl::ordered_map<int, int> intmap;
 | 
			
		||||
// typedef tsl::ordered_map<string,string> stringmap;
 | 
			
		||||
//
 | 
			
		||||
// // Tessil tsl::robin_map
 | 
			
		||||
// typedef tsl::robin_map<int, int> intmap;
 | 
			
		||||
// typedef tsl::robin_map<string,string> stringmap;
 | 
			
		||||
// 
 | 
			
		||||
// // Tessil hopscotch_map
 | 
			
		||||
// typedef tsl::hopscotch_map<int, int> intmap;
 | 
			
		||||
// typedef tsl::hopscotch_map<string,string> stringmap;
 | 
			
		||||
//
 | 
			
		||||
// // Boost::unordered_map
 | 
			
		||||
// typedef boost::unordered_map<int, int> intmap;
 | 
			
		||||
// typedef boost::unordered_map<string,string> stringmap;
 | 
			
		||||
// 
 | 
			
		||||
// // skarupke's unordered map
 | 
			
		||||
// typedef ska::unordered_map<int, int> intmap;
 | 
			
		||||
// typedef ska::unordered_map<string,string> stringmap;
 | 
			
		||||
//
 | 
			
		||||
// // skarupke's bytell hash map
 | 
			
		||||
// typedef ska::bytell_hash_map<int, int> intmap;
 | 
			
		||||
// typedef ska::bytell_hash_map<string,string> stringmap;
 | 
			
		||||
//
 | 
			
		||||
// // skarupke's flat hash map
 | 
			
		||||
// typedef ska::flat_hash_map<int, int> intmap;
 | 
			
		||||
// typedef ska::flat_hash_map<string,string> stringmap;
 | 
			
		||||
//
 | 
			
		||||
// // greg7mdp's flat hash map
 | 
			
		||||
// typedef phmap::parallel_flat_hash_map<int, int> intmap;
 | 
			
		||||
// typedef phmap::parallel_flat_hash_map<string,string> stringmap;
 | 
			
		||||
//
 | 
			
		||||
// // greg7mdp's  hash map
 | 
			
		||||
// typedef phmap::parallel_node_hash_map<int, int> intmap;
 | 
			
		||||
// typedef phmap::parallel_node_hash_map<string,string> stringmap;
 | 
			
		||||
// // emilib's  hash map
 | 
			
		||||
// typedef emilib::HashMap<int, int> intmap;
 | 
			
		||||
// typedef emilib::HashMap<string,string> stringmap;
 | 
			
		||||
// // martin flat map
 | 
			
		||||
// typedef robin_hood::unordered_flat_map<int, int> intmap;
 | 
			
		||||
// typedef robin_hood::unordered_flat_map<string,string> stringmap;
 | 
			
		||||
// martin flat map
 | 
			
		||||
// typedef robin_hood::unordered_node_map<int, int> intmap;
 | 
			
		||||
// typedef robin_hood::unordered_node_map<string,string> stringmap;
 | 
			
		||||
int main(int argc, char** argv) {
 | 
			
		||||
    CLI::App app{"Hashmap benchmarks"};
 | 
			
		||||
    vector<int> hashmaps = {1, 2, 3, 4, 5, 6, 7, 8, 9};
 | 
			
		||||
    app.add_option("-i,--implementation", hashmaps, choicetext )->delimiter(',');
 | 
			
		||||
    bool use_abseil_hash = false;
 | 
			
		||||
    app.add_option("-a,--abseil", use_abseil_hash, "use absl::Hash, default is false");
 | 
			
		||||
    int runs = 1;
 | 
			
		||||
    app.add_option("-r,--runs", runs, "total runs for each map, default is 1");
 | 
			
		||||
    CLI11_PARSE(app, argc, argv);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* test takes 2hrs  for 30 runs for unordered_map hashmap
 | 
			
		||||
// if the other maps have about the same operation times, it'll
 | 
			
		||||
// take around ~40hrs total ************
 | 
			
		||||
// priorities are that the interface must be the same/similar to unordered_map
 | 
			
		||||
// and that we don't have to jump through hoops to get it to work
 | 
			
		||||
1. Google dense_hash_map [y] https://github.com/sparsehash/sparsehash
 | 
			
		||||
2. Google sparse_hash_map [y]
 | 
			
		||||
3. abseil node_hash_map [y]  https://abseil.io/docs/cpp/tools/cmake-installs
 | 
			
		||||
4. abseil flat_hash_map [y]
 | 
			
		||||
5. Tessil/sparse-map/ [y]  header only implementation for all tessil
 | 
			
		||||
6. Tessil/hopscotch-map[y]
 | 
			
		||||
7. tessil/robin-map[y] [y]
 | 
			
		||||
8. Boost unordered_map [y] just install boost with your package manager
 | 
			
		||||
9. skarupke/flat_hash_map [y] header only implementation
 | 
			
		||||
10. skarupke /bytell_hash_map [y]
 | 
			
		||||
11. skarupke/unordered_map [y]
 | 
			
		||||
12. greg7mdp/parallel-hashmap/paralel_flat [y] header only
 | 
			
		||||
13. greg7mdp/parallel-hashmap/paralel_node [y] 
 | 
			
		||||
17. emilk/emilib emilib::hashmap [y] header only
 | 
			
		||||
18. martinus robin_hood::unordered_node_map [y]
 | 
			
		||||
19. martinus/robin_hood/ flatmap [y]
 | 
			
		||||
 | 
			
		||||
3. folly F14ValueMap // lots of dependencies, even tho it really seems cool
 | 
			
		||||
4. folly F14NodeMap
 | 
			
		||||
5. Tessil/ordered-map [n] something is wrong with this one, verrrrry slow
 | 
			
		||||
6. Tessil/array-hash[n] (not with a small modification of the insert function)
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
int main() {
 | 
			
		||||
    time_point<steady_clock> start_test = steady_clock::now();
 | 
			
		||||
    int_test_aggregate(intmap{}, 2);
 | 
			
		||||
    string_test_aggregate(stringmap{}, 2);
 | 
			
		||||
    if (use_abseil_hash) {
 | 
			
		||||
        for (auto i : hashmaps) {
 | 
			
		||||
            switch (i) {
 | 
			
		||||
                case 1: {
 | 
			
		||||
                    int_test_aggregate(std::unordered_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(std::unordered_map<string, string>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                case 2: {
 | 
			
		||||
                    int_test_aggregate(google::sparse_hash_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(google::sparse_hash_map<string, string>{}, runs);
 | 
			
		||||
                    int_test_aggregate(google::dense_hash_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(google::dense_hash_map<string, string>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 3: {
 | 
			
		||||
                    int_test_aggregate(absl::node_hash_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(absl::node_hash_map<string, string>{}, runs);
 | 
			
		||||
                    int_test_aggregate(absl::flat_hash_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(absl::flat_hash_map<string, string>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 4: {
 | 
			
		||||
                    int_test_aggregate(tsl::sparse_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(tsl::sparse_map<string, string>{}, runs);
 | 
			
		||||
                    // int_test_aggregate(tsl::array_map<int, int>{}, runs);
 | 
			
		||||
                    // string_test_aggregate(tsl::array_map<string, string>{}, runs);
 | 
			
		||||
                    // int_test_aggregate(tsl::ordered_map<int, int>{}, runs);
 | 
			
		||||
                    // string_test_aggregate(tsl::ordered_map<string, string>{}, runs);
 | 
			
		||||
                    int_test_aggregate(tsl::robin_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(tsl::robin_map<string, string>{}, runs);
 | 
			
		||||
                    int_test_aggregate(tsl::hopscotch_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(tsl::hopscotch_map<string, string>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 5: {
 | 
			
		||||
                    int_test_aggregate(boost::unordered_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(boost::unordered_map<string, string>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 6: {
 | 
			
		||||
                    int_test_aggregate(ska::unordered_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(ska::unordered_map<string, string>{}, runs);
 | 
			
		||||
                    int_test_aggregate(ska::bytell_hash_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(ska::bytell_hash_map<string, string>{}, runs);
 | 
			
		||||
                    int_test_aggregate(ska::flat_hash_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(ska::flat_hash_map<string, string>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 7: {
 | 
			
		||||
                    int_test_aggregate(phmap::parallel_flat_hash_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(phmap::parallel_flat_hash_map<string, string>{}, runs);
 | 
			
		||||
                    int_test_aggregate(phmap::parallel_node_hash_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(phmap::parallel_node_hash_map<string, string>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 8: {
 | 
			
		||||
                    int_test_aggregate(emilib::HashMap<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(emilib::HashMap<string, string>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 9: {
 | 
			
		||||
                    int_test_aggregate(robin_hood::unordered_flat_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(robin_hood::unordered_flat_map<string, string>{}, runs);
 | 
			
		||||
                    int_test_aggregate(robin_hood::unordered_node_map<int, int>{}, runs);
 | 
			
		||||
                    string_test_aggregate(robin_hood::unordered_node_map<string, string>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
    } else {
 | 
			
		||||
        for (auto i : hashmaps) {
 | 
			
		||||
            switch (i) {
 | 
			
		||||
                case 1: {
 | 
			
		||||
                    int_test_aggregate(std::unordered_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(std::unordered_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                case 2: {
 | 
			
		||||
                    int_test_aggregate(google::sparse_hash_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(google::sparse_hash_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    int_test_aggregate(google::dense_hash_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(google::dense_hash_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 3: {
 | 
			
		||||
                    int_test_aggregate(absl::node_hash_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(absl::node_hash_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    int_test_aggregate(absl::flat_hash_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(absl::flat_hash_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 4: {
 | 
			
		||||
                    int_test_aggregate(tsl::sparse_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(tsl::sparse_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    // int_test_aggregate(tsl::array_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    // string_test_aggregate(tsl::array_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    // int_test_aggregate(tsl::ordered_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    // string_test_aggregate(tsl::ordered_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    int_test_aggregate(tsl::robin_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(tsl::robin_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    int_test_aggregate(tsl::hopscotch_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(tsl::hopscotch_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 5: {
 | 
			
		||||
                    int_test_aggregate(boost::unordered_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(boost::unordered_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 6: {
 | 
			
		||||
                    int_test_aggregate(ska::unordered_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(ska::unordered_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    int_test_aggregate(ska::bytell_hash_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(ska::bytell_hash_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    int_test_aggregate(ska::flat_hash_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(ska::flat_hash_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 7: {
 | 
			
		||||
                    int_test_aggregate(phmap::parallel_flat_hash_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(phmap::parallel_flat_hash_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    int_test_aggregate(phmap::parallel_node_hash_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(phmap::parallel_node_hash_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 8: {
 | 
			
		||||
                    int_test_aggregate(emilib::HashMap<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(emilib::HashMap<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case 9: {
 | 
			
		||||
                    int_test_aggregate(robin_hood::unordered_flat_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(robin_hood::unordered_flat_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    int_test_aggregate(robin_hood::unordered_node_map<int, int, Hash<int>>{}, runs);
 | 
			
		||||
                    string_test_aggregate(robin_hood::unordered_node_map<string, string, Hash<string>>{}, runs);
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
    time_point<steady_clock> end_test = steady_clock::now();
 | 
			
		||||
    std::cout << "\n\n 30 runs for all tests for 1 map: " << duration_cast<seconds>(end_test-start_test).count() << " seconds\n\n";
 | 
			
		||||
 
 | 
			
		||||
    std::cout << "\n\n 30 runs for all tests for 1 map: " << duration_cast<seconds>(end_test - start_test).count()
 | 
			
		||||
    << " seconds\n\n";
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user