ladybird/Tests/AK
Tim Schumacher b1136ba357 AK: Efficiently resize CircularBuffer seekback copy distance
Previously, if we copied the last byte for a length of 100, we'd
recalculate the read span 100 times and memmove one byte 100 times,
which resulted in a lot of overhead.

Now, if we know that we have two consecutive copies of the data, we just
extend the distance to cover both copies, which halves the number of
times that we recalculate the span and actually call memmove.

This takes the running time of the attached benchmark case from 150ms
down to 15ms.
2023-04-14 10:03:42 +02:00
..
CMakeLists.txt AK: Add AK::SIMD::exp_approximate 2023-02-18 01:45:00 +01:00
TestAllOf.cpp AK+Everywhere: Stop including Vector.h from StringView.h 2021-11-10 21:58:58 +01:00
TestAnyOf.cpp AK+Everywhere: Stop including Vector.h from StringView.h 2021-11-10 21:58:58 +01:00
TestArbitrarySizedEnum.cpp AK: Add an ArbitrarySizedEnum template 2022-03-27 18:54:56 +02:00
TestArray.cpp Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
TestAtomic.cpp
TestBadge.cpp
TestBase64.cpp AK: Stop using DeprecatedString in Base64 encoding 2022-12-20 10:34:19 +01:00
TestBinaryHeap.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestBinarySearch.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestBitCast.cpp Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
TestBitmap.cpp AK+Everywhere: Replace all Bitmap::must_create() uses with ::create() 2022-12-22 15:48:53 +01:00
TestBitStream.cpp AK: Increase LittleEndianOutputBitStream's buffer size and remove loops 2023-04-02 10:54:37 +02:00
TestBuiltinWrappers.cpp AK: Add BuiltinWrappers.h 2021-12-18 23:36:08 +01:00
TestByteBuffer.cpp AK: Allow Vector<ByteBuffer>::contains_slow to accept (Readonly)Bytes 2023-02-10 22:18:19 +00:00
TestCharacterTypes.cpp Tests: Reduce runtime of TestCharacterTypes 2021-06-24 09:16:28 +02:00
TestChecked.cpp Tests: Add tests for Checked<> decrement operator 2022-12-08 07:20:14 -05:00
TestCircularBuffer.cpp AK: Efficiently resize CircularBuffer seekback copy distance 2023-04-14 10:03:42 +02:00
TestCircularDeque.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestCircularQueue.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestComplex.cpp
TestDeprecatedString.cpp AK: Fix DeprecatedString::bijective_base_from for large numbers 2023-02-26 21:06:21 +03:30
TestDisjointChunks.cpp AK: Remove try_ prefix from FixedArray creation functions 2023-01-28 22:41:36 +01:00
TestDistinctNumeric.cpp AK: Fix typo in -= operator of DistinctNumeric 2023-01-06 12:01:46 +01:00
TestDoublyLinkedList.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TestEndian.cpp AK: Add tests for LittleEndian<enum class> 2022-12-28 22:27:19 -05:00
TestEnumBits.cpp AK/Tests: Add test for EnumBits has_any_flag() 2021-07-16 11:49:50 +02:00
TestFind.cpp Tests: Remove unused header includes 2021-08-01 08:10:16 +02:00
TestFixedArray.cpp AK+Tests: Don't double-destroy NoAllocationGuard in TestFixedArray 2022-09-15 23:04:46 +00:00
TestFixedPoint.cpp AK: Make FixedPoint(FloatingPoint) ctor round instead of truncating 2023-03-03 09:23:02 +00:00
TestFloatingPoint.cpp AK: Add FloatingPoint.h 2022-08-27 12:28:05 +02:00
TestFloatingPointParsing.cpp AK: Remove i686 support 2022-12-28 11:53:41 +01:00
TestFlyString.cpp AK: Add FlyString::is_one_of for variadic string comparison 2023-04-06 23:49:08 +02:00
TestFormat.cpp AK: Add option to the string formatter to use a digit separator 2023-04-11 13:03:30 +02:00
TestGenericLexer.cpp AK+Everywhere: Make GenericLexer::ignore_until() stop before the value 2023-02-28 12:55:10 +00:00
TestHashFunctions.cpp AK: Remove unused rehash_for_collision 2023-02-17 22:29:51 -07:00
TestHashMap.cpp AK: Rename CaseInsensitiveStringViewTraits to reflect intent 2023-03-14 21:34:32 +00:00
TestHashTable.cpp AK: Clear OrderedHashTable previous/next pointers on removal 2023-03-15 21:43:52 +01:00
TestHex.cpp
TestIndexSequence.cpp AK+Everywhere: Stop including Vector.h from StringView.h 2021-11-10 21:58:58 +01:00
TestInsertionSort.cpp AK: Introduce cutoff to insertion sort for Quicksort 2022-12-12 15:03:57 +00:00
TestIntegerMath.cpp AK: Introduce IntegralMath.h starting with pow<I> 2022-02-06 17:52:33 +00:00
TestIntrusiveList.cpp AK+Everywhere: Reduce the number of template parameters of IntrusiveList 2021-09-10 18:05:46 +03:00
TestIntrusiveRedBlackTree.cpp Everywhere: Remove NonnullOwnPtr.h includes 2023-03-06 23:46:35 +01:00
TestIPv4Address.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
TestIPv6Address.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
TestJSON.cpp Tests: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-26 09:57:14 -05:00
TestLEB128.cpp AK: Remove the fallible constructor from FixedMemoryStream 2023-02-08 17:44:32 +00:00
TestLexicalPath.cpp AK: Create relative path even if prefix is not an ancestor of the path 2022-12-14 15:11:03 +00:00
TestMACAddress.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
TestMemory.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestMemoryStream.cpp AK: Rename Stream::write_entire_buffer to Stream::write_until_depleted 2023-03-13 15:16:20 +00:00
TestNeverDestroyed.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TestNonnullRefPtr.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestNumberFormat.cpp AK+Tests: Add a test for formatting numbers in base 10 units 2023-01-02 20:11:18 +00:00
TestOptional.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestOwnPtr.cpp AK+Everywhere: Move custom deleter capability to OwnPtr 2022-12-17 16:00:08 -05:00
TestPrint.cpp AK: Allow printing wide characters using %ls modifier 2022-03-30 11:30:43 +04:30
TestQueue.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestQuickSelect.cpp AK: Testing for AK::quickselect_inline 2023-02-03 19:04:15 +01:00
TestQuickSort.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TestRedBlackTree.cpp AK: Clear minimum when removing last node of RedBlackTree 2022-02-10 14:09:39 +00:00
TestRefPtr.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestSIMD.cpp AK: Add AK::SIMD::exp_approximate 2023-02-18 01:45:00 +01:00
TestSinglyLinkedList.cpp AK: Combine SinglyLinkedList and SinglyLinkedListWithCount 2023-01-02 20:13:24 +00:00
TestSourceGenerator.cpp
TestSourceLocation.cpp Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00
TestSpan.cpp Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
TestStack.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestStatistics.cpp AK: Add thresholds to quickselect_inline and Statistics::Median 2023-02-03 19:04:15 +01:00
TestStdLibExtras.cpp Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2022-01-31 18:23:22 +00:00
TestString.cpp Everywhere: Remove unintentional partial stream reads and writes 2023-03-13 15:16:20 +00:00
TestStringFloatingPointConversions.cpp AK: Add framework for a unified floating point to string conversion 2022-11-03 20:17:09 -06:00
TestStringUtils.cpp AK: Ensure string types are actually considered hash-compatible 2023-02-02 19:14:00 +00:00
TestStringView.cpp AK: Rename CaseInsensitiveStringViewTraits to reflect intent 2023-03-14 21:34:32 +00:00
TestTime.cpp AK: Reimplement comparisons on AK::Time using operator<=> 2023-01-07 14:51:04 +01:00
TestTrie.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestTuple.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
TestTypedTransfer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TestTypeTraits.cpp Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
TestUFixedBigInt.cpp AK: Implement Knuth's algorithm D for dividing UFixedBigInt's 2023-03-04 22:10:03 -07:00
TestURL.cpp AK: Don't store parts of URLs percent decoded 2023-04-12 07:40:22 +02:00
TestUtf8.cpp AK: Invalidate overlong UTF-8 code point encodings 2023-03-03 11:46:42 -05:00
TestUtf16.cpp Everywhere: Use _{short_,}string to create Strings from literals 2023-02-25 20:51:49 +01:00
TestVariant.cpp AK: Specialize TypeList for Variant types 2022-12-26 09:36:16 +01:00
TestVector.cpp AK+Tests: Add Vector::find_first_index_if() 2023-04-13 09:53:47 +02:00
TestWeakPtr.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00