serenity/AK
Jelle Raaijmakers c08d137fcd AK: Reimplement HashTable with smart linear probing
Instead of rehashing on collisions, we use Robin Hood hashing: a simple
linear probe where we keep track of the distance between the bucket and
its ideal position. On insertion, we allow a new bucket to "steal" the
position of "rich" buckets (those near their ideal position) and move
them further down.

On removal, we shift buckets back up into the freed slot, decrementing
their distance while doing so.

This behavior automatically optimizes the number of required probes for
any value, and removes the need for periodic rehashing (except when
expanding the capacity).
2023-02-17 22:29:51 -07:00
..
.clang-tidy
AllOf.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
AnyOf.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
ArbitrarySizedEnum.h AK: Patch ArbitrarySizedEnum operators for missing constructor 2023-01-18 22:58:42 +01:00
Array.h Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
Assertions.cpp AK: Always define ak_assertion_failed, even when NDEBUG is false 2023-02-05 09:46:51 -07:00
Assertions.h AK: Always define ak_assertion_failed, even when NDEBUG is false 2023-02-05 09:46:51 -07:00
Atomic.h Everywhere: Stop shoving things into ::std and mentioning them as such 2022-12-14 11:44:32 +01:00
AtomicRefCounted.h Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
Badge.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Base64.cpp AK+LibWeb: Move decode forgiving base64 under Web::Infra namespace 2023-01-10 17:54:01 +00:00
Base64.h AK+LibWeb: Move decode forgiving base64 under Web::Infra namespace 2023-01-10 17:54:01 +00:00
BinaryBufferWriter.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
BinaryHeap.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
BinarySearch.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
BitCast.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Bitmap.h AK+Everywhere: Replace all Bitmap::must_create() uses with ::create() 2022-12-22 15:48:53 +01:00
BitmapView.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
BitStream.h AK: Remove the fallible constructor from LittleEndianOutputBitStream 2023-02-08 17:44:32 +00:00
BufferedStream.h Everywhere: Remove the AK:: qualifier from Stream usages 2023-02-13 00:50:07 +00:00
BuiltinWrappers.h AK: Fix build with !USING_AK_GLOBALLY 2022-12-13 08:09:56 +03:30
BumpAllocator.h AK: Take the bump-allocated chunk header into account in destroy_all() 2022-12-06 11:19:50 +01:00
ByteBuffer.h AK: Allow Vector<ByteBuffer>::contains_slow to accept (Readonly)Bytes 2023-02-10 22:18:19 +00:00
ByteReader.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
CharacterTypes.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Checked.h AK: Use __has_builtin() in Checked.h 2022-12-19 09:29:12 -05:00
CheckedFormatString.h Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
CircularBuffer.cpp AK+Test: Fix a logic error in CircularBuffer::offset_of() 2023-01-15 23:23:24 +00:00
CircularBuffer.h AK: Add an optional starting offset to CircularBuffer::offset_of 2023-01-14 16:20:30 -07:00
CircularDeque.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
CircularQueue.h AK: Remove CircularDuplexStream 2023-01-14 12:05:52 -05:00
CMakeLists.txt AK: Add conversion functions for packed DOS time format 2023-02-12 13:13:15 -07:00
Complex.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Concepts.h AK: Add the ConvertibleTo concept 2023-02-04 18:47:02 -07:00
DateConstants.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Debug.h.in Shell: Start implementing a POSIX-compliant parser 2023-02-13 23:00:15 +03:30
DefaultDelete.h AK+Everywhere: Move custom deleter capability to OwnPtr 2022-12-17 16:00:08 -05:00
Demangle.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
DeprecatedFlyString.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
DeprecatedFlyString.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
DeprecatedString.cpp AK: Remove the deprecated Stream implementation :^) 2023-02-08 19:18:26 +00:00
DeprecatedString.h AK: Remove the deprecated Stream implementation :^) 2023-02-08 19:18:26 +00:00
Diagnostics.h AK: Add a helper macro to temporarily ignore diagnostics with _Pragma() 2022-12-06 21:31:00 +00:00
DisjointChunks.h AK: Remove try_ prefix from FixedArray creation functions 2023-01-28 22:41:36 +01:00
DistinctNumeric.h AK: Add a type alias for DistinctNumeric's underlying type 2023-01-21 10:36:14 +01:00
DOSPackedTime.cpp AK: Add conversion functions for packed DOS time format 2023-02-12 13:13:15 -07:00
DOSPackedTime.h AK: Add conversion functions for packed DOS time format 2023-02-12 13:13:15 -07:00
DoublyLinkedList.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Endian.h AK: Remove the deprecated Stream implementation :^) 2023-02-08 19:18:26 +00:00
EnumBits.h Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
Error.cpp AK: Add a new method to propagate errno while printing errors in Kernel 2023-02-10 09:14:20 +00:00
Error.h AK: Provide is_errno for Kernel Errors 2023-02-10 12:15:02 +01:00
ExtraMathConstants.h
Find.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
FixedArray.h Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
FixedPoint.h AK: Make FixedPoint::create_raw public and constexpr 2023-01-23 18:09:23 +00:00
FloatingPoint.h Everywhere: Remove unused includes of AK/Concepts.h 2023-01-02 20:27:20 -05:00
FloatingPointStringConversions.cpp Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
FloatingPointStringConversions.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
FlyString.cpp AK: Let FlyStrings be assigned from Strings 2023-02-15 12:48:26 -05:00
FlyString.h AK: Let FlyStrings be assigned from Strings 2023-02-15 12:48:26 -05:00
Format.cpp Kernel: Protect Process::m_name with a spinlock 2023-02-06 20:36:53 +01:00
Format.h AK: Disallow returning of string literals for errors in kernel code 2023-02-10 09:14:20 +00:00
Forward.h AK: Remove the deprecated Stream implementation :^) 2023-02-08 19:18:26 +00:00
FPControl.h
Function.h AK: Check the return type in IsCallableWithArguments 2023-02-04 18:47:02 -07:00
FuzzyMatch.cpp Everywhere: Remove string.h include from AK/Traits.h and resolve fallout 2023-01-21 10:43:59 -07:00
FuzzyMatch.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
GenericLexer.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
GenericLexer.h AK: Add an input() accessor to GenericLexer 2023-02-18 06:55:46 +03:30
GenericShorthands.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
HashFunctions.h AK: Rename double_hash to rehash_for_collision 2023-01-21 10:36:14 +01:00
HashMap.h AK: Add function 'shallow_clone()' to HashMap 2023-02-12 00:18:09 +00:00
HashTable.h AK: Reimplement HashTable with smart linear probing 2023-02-17 22:29:51 -07:00
Hex.cpp AK: Disallow returning of string literals for errors in kernel code 2023-02-10 09:14:20 +00:00
Hex.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
IDAllocator.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
InsertionSort.h AK: Introduce cutoff to insertion sort for Quicksort 2022-12-12 15:03:57 +00:00
IntegralMath.h AK: Implement FloatExtractor<f128> 2022-12-02 16:22:51 +01:00
IntrusiveDetails.h
IntrusiveList.h AK: Remove unimplemented methods 2023-01-27 20:33:18 +00:00
IntrusiveListRelaxedConst.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
IntrusiveRedBlackTree.h Everywhere: Remove unnecessary AK and Detail namespace scoping 2022-12-09 11:25:30 +00:00
IPv4Address.h AK: Remove unused network ordered 'address' variable 2023-01-31 12:42:49 +01:00
IPv6Address.h AK: Don't inherit Formatter<ErrorOr<T>> for Formatter<IPv6Address> 2023-01-13 21:09:26 +00:00
IterationDecision.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Iterator.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
JsonArray.h AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
JsonArraySerializer.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
JsonObject.cpp AK: Remove JsonObject::get_deprecated() and ::get_ptr() :^) 2023-02-03 07:19:52 -05:00
JsonObject.h AK: Remove JsonObject::get_deprecated() and ::get_ptr() :^) 2023-02-03 07:19:52 -05:00
JsonObjectSerializer.h Everywhere: Remove string.h include from AK/Traits.h and resolve fallout 2023-01-21 10:43:59 -07:00
JsonParser.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
JsonParser.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
JsonPath.cpp AK: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-17 19:52:52 -05:00
JsonPath.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
JsonValue.cpp AK: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-17 19:52:52 -05:00
JsonValue.h AK: Add JsonValue::{is,as}_integer() methods 2023-01-17 19:52:52 -05:00
kmalloc.cpp AK: Provide a fallback definition for std::nothrow 2023-01-29 19:16:44 -07:00
kmalloc.h AK: Fully qualify some usages of AK features outside of the AK namespace 2022-11-27 23:54:40 +01:00
kstdio.h
LEB128.h Everywhere: Remove the AK:: qualifier from Stream usages 2023-02-13 00:50:07 +00:00
LexicalPath.cpp AK: Create relative path even if prefix is not an ancestor of the path 2022-12-14 15:11:03 +00:00
LexicalPath.h AK: Add LexicalPath::is_child_of 2022-12-11 16:05:23 +00:00
MACAddress.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Math.h AK: Reorder AK/Math after the removal of i686 2023-01-09 11:36:21 +01:00
MaybeOwned.h AK: Move Handle from LibCore and name it MaybeOwned 2023-01-29 19:16:44 -07:00
MemMem.h Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
Memory.h Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
MemoryStream.cpp AK: Disallow returning of string literals for errors in kernel code 2023-02-10 09:14:20 +00:00
MemoryStream.h AK: Remove the fallible constructor from FixedMemoryStream 2023-02-08 17:44:32 +00:00
NeverDestroyed.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
NoAllocationGuard.h AK: Restrict include of LibC header 2023-01-07 10:01:37 -07:00
Noncopyable.h
NonnullOwnPtr.h AK: Move try_make() to NonnullOwnPtr.h 2023-02-11 08:53:00 -05:00
NonnullOwnPtrVector.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
NonnullPtrVector.h
NonnullRefPtr.h AK: Move try_make_ref_counted() to NonnullRefPtr.h 2023-02-11 08:53:00 -05:00
NonnullRefPtrVector.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
NumberFormat.cpp AK: Add an option to format numbers with 1000 based units 2023-01-02 20:11:18 +00:00
NumberFormat.h AK: Add an option to format numbers with 1000 based units 2023-01-02 20:11:18 +00:00
NumericLimits.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Optional.h AK: Export the OptionalNone helper structure 2023-01-16 10:12:37 +00:00
OwnPtr.h AK: Move try_make() to NonnullOwnPtr.h 2023-02-11 08:53:00 -05:00
Platform.h AK: Remove ARCH(I386) macro 2022-12-28 11:53:41 +01:00
PrintfImplementation.h Everywhere: Remove string.h include from AK/Traits.h and resolve fallout 2023-01-21 10:43:59 -07:00
Ptr32.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Queue.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
QuickSelect.h AK: Add thresholds to quickselect_inline and Statistics::Median 2023-02-03 19:04:15 +01:00
QuickSort.h AK: Change quicksort comments to standard // style 2022-12-12 15:03:57 +00:00
Random.cpp
Random.h AK: Make NonnullPtrVectors shuffleable 2023-01-22 21:31:36 +00:00
RecursionDecision.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
RedBlackTree.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
RefCounted.h Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
RefCountForwarder.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
RefPtr.h AK: Move try_make_ref_counted() to NonnullRefPtr.h 2023-02-11 08:53:00 -05:00
Result.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
ReverseIterator.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
ScopedValueRollback.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
ScopeGuard.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
ScopeLogger.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
SIMD.h
SIMDExtras.h
SIMDMath.h AK: Add AK::SIMD::exp_approximate 2023-02-18 01:45:00 +01:00
Singleton.h Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00
SinglyLinkedList.h AK: Combine SinglyLinkedList and SinglyLinkedListWithCount 2023-01-02 20:13:24 +00:00
SinglyLinkedListSizePolicy.h AK: Combine SinglyLinkedList and SinglyLinkedListWithCount 2023-01-02 20:13:24 +00:00
SourceGenerator.h AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
SourceLocation.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Span.h Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
Stack.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
StackInfo.cpp Everywhere: Add support for compilation under emscripten 2022-11-26 02:23:15 +03:30
StackInfo.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Statistics.h AK: Add thresholds to quickselect_inline and Statistics::Median 2023-02-03 19:04:15 +01:00
StdLibExtraDetails.h AK: Move the definition of IsCallableWithArguments to Function.h 2023-02-04 18:47:02 -07:00
StdLibExtras.h AK: Bring back the AK_DONT_REPLACE_STD #define 2022-12-14 12:56:01 +01:00
Stream.cpp AK: Provide is_errno for Kernel Errors 2023-02-10 12:15:02 +01:00
Stream.h AK: Make SeekableStream::truncate() take a size_t 2023-02-04 18:41:27 -07:00
String.cpp AK: Add String::trim 2023-01-28 00:13:46 +00:00
String.h AK: Use constexpr instead of consteval on OpenBSD 2023-02-04 16:11:54 -07:00
StringBuilder.cpp AK: Add StringBuilder::to_fly_string() 2023-02-15 12:48:26 -05:00
StringBuilder.h AK: Add StringBuilder::to_fly_string() 2023-02-15 12:48:26 -05:00
StringFloatingPointConversions.cpp Everywhere: Fix a few comment typos 2022-11-09 16:00:32 +00:00
StringFloatingPointConversions.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
StringHash.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
StringImpl.cpp AK: Remove unused HashTable.h include from StringImpl 2023-02-17 22:29:51 -07:00
StringImpl.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
StringUtils.cpp AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
StringUtils.h AK: Add DeprecatedString::find_last(StringView) 2022-12-20 11:24:05 +01:00
StringView.cpp AK: Add support for the new FlyString to StringView 2023-01-28 15:24:55 +00:00
StringView.h AK: Allow propagating errors from StringView::for_each_split_view() 2023-02-05 16:40:51 +01:00
TemporaryChange.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Time.cpp AK: Reimplement comparisons on AK::Time using operator<=> 2023-01-07 14:51:04 +01:00
Time.h Everywhere: Remove string.h include from AK/Traits.h and resolve fallout 2023-01-21 10:43:59 -07:00
Traits.h Everywhere: Remove string.h include from AK/Traits.h and resolve fallout 2023-01-21 10:43:59 -07:00
Trie.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Try.h AK+Everywhere: Do not implicitly copy variables in TRY macros 2023-02-10 09:08:52 +00:00
Tuple.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
TypeCasts.h Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
TypedTransfer.h Everywhere: Stop shoving things into ::std and mentioning them as such 2022-12-14 11:44:32 +01:00
TypeList.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Types.h Everywhere: Remove unused includes of AK/IterationDecision.h 2023-01-02 20:08:35 +00:00
UBSanitizer.h Everywhere: Fix badly-formatted includes 2023-01-02 11:06:15 -05:00
UFixedBigInt.h Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
UnicodeUtils.h AK: Make StringBuilder::try_append_code_point actually fallible 2023-01-08 12:13:15 +01:00
URL.cpp AK+Tests+LibWeb: Make URL::complete_url() take a StringView 2023-02-15 12:48:26 -05:00
URL.h AK+Tests+LibWeb: Make URL::complete_url() take a StringView 2023-02-15 12:48:26 -05:00
URLParser.cpp AK: Use base URL when the specified URL is empty 2023-01-06 13:59:17 -07:00
URLParser.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
Userspace.h Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
Utf8View.cpp AK: Add Utf8View::iterator_at_byte_offset_without_validation() 2022-11-24 16:06:20 +00:00
Utf8View.h AK: Add two helpers to DeprecatedStringCodePointIterator 2023-01-29 23:41:42 +01:00
Utf16View.cpp AK: Add spec comments to Utf16CodePointIterator::operator*() 2023-01-22 21:30:44 +00:00
Utf16View.h Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
Utf32View.h AK: Make it possible to not using AK classes into the global namespace 2022-11-26 15:51:34 +01:00
UUID.cpp AK: Stop using DeprecatedString in UUID 2022-12-20 10:34:19 +01:00
UUID.h AK: Stop using DeprecatedString in UUID 2022-12-20 10:34:19 +01:00
Variant.h AK+LibWeb: Implement Variant equality operator 2023-02-17 16:22:56 +00:00
Vector.h AK: Always initialize vector capacity to inline_capacity 2023-02-11 00:03:14 +01:00
Weakable.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
WeakPtr.h AK: Make WeakPtr<T>::value() return NonnullRefPtr<T> 2023-02-05 15:38:19 +01:00