You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Code/Framework/AzCore/Tests
lumberyard-employee-dm 098005afbc
AZStd::basic_string improvements (#6438)
* AZStd::basic_string improvements

The AZStd::basic_string class has a better implementation of the Short
String Optimization, which increases the amount of characters that can
be stored in a `basic_string<char>` from 15 characters to 22
characters(not-including null-terminating characters). For a
`basic_string<wchar_t>` on Windows the amount of characters that can be
stored increases from 7 to 10. Using `basic_string<wchar_t>` on Unix
platforms SSO character amount from 3 to 4 characters.

An additional benefit is that the size of the AZStd::basic_string class
has been reduced from 40 bytes to 32 bytes when using the
AZStd::allocator.
When using a stateless allocator with no non static data members such as
AZStd::stateless_allocator, the size of the AZStd::basic_string is 24
bytes.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Corrected comments and updated type alias to usings for AZStd::basic_string

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Added Benchmarks for the basic_string and basic_fixed_string class

The benchmarks currently measure the speed of the `assign` overloads.
A benchmark has also been added to compare the speed swapping two
`basic_string` instances by 3 memcpy vs 3 pointer swap operations

Speed up string operation when in the iterator overload cases of the
`assign`, `append`, `insert` and `replace` function.
The code was always performing the logic to copy over a string that is
overlapping, without actually checking if the string was overlapping in
the first place.

Added an `az_builtin_is_constant_evaluated` macro that allows use of the
C++20 `std::is_constant_evaluated` feature to determine if an operation
is being performed at compile time vs run time.

That macro is being used to speed up the char_trait operations at run
time, by using the faster standard library functions.
For example char_traits::move now uses "memmove" at runtime, instead of
a for loop.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Simplified string logic in AWSMetricsServiceApiTest.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
..
AZStd AZStd::basic_string improvements (#6438) 4 years ago
AZTestShared Code/Framework fixes 4 years ago
Asset Merging from development 4 years ago
Console Fixes debug console autocomplete issues (#4223) 4 years ago
DOM Merging from development 4 years ago
Debug Removes AssetMemoryAnalyzer that relies on the MemoryDrillerBus 4 years ago
EBus Removal and Replacement of the CryTimer (gEnv->pTimer) (#5409) 4 years ago
IO Update the FileIO Aliases (#4186) 4 years ago
Math AzCore Math tests produce errors that need to be disabled in debug (#6678) 4 years ago
Memory Memory/benchmarks (#5896) 4 years ago
Name Implemented C++23 deleted nullptr_t constructor/assignment for AZStd string classes (#4158) 4 years ago
Platform Memory/benchmarks (#5896) 4 years ago
RTTI Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
Serialization/Json Death test relies on an exception from ocurring, that exception is an access violation, which could not happen (i.e. the memory could be valid for the process) (#6683) 4 years ago
Settings Added the --regset-file option for setreg file loading (#5768) 4 years ago
Streamer Preapre codebase for FileRequest compiletime improvements (#6192) 4 years ago
Time Remove time tests that relied on main-thread sleeps 4 years ago
AssetJsonSerializerTests.cpp {lyn7283} added test for assetHint Json Serialzier callback logic (#4586) 4 years ago
AssetManager.cpp Cleanup SerializeContext.h pt.1 (#4264) 4 years ago
AssetSerializerTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
AzEnumTest.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
BehaviorContext.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
BehaviorContextFixture.h [LYN-8041] Enable relocation of the Project Game Release Layout (#5380) 4 years ago
Components.cpp Removes m_enableDrilling 4 years ago
DLL.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
DLLMainTest.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
Debug.cpp Replaces handlers of TraceMessageDrillerBus with handlers of TraceMessageBus 4 years ago
EBus.cpp Removes Driller from AzCore 4 years ago
EntityIdTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
EntityTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
EnumTests.cpp more fixes for Code 4 years ago
EventTests.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
FileIOBaseTestTypes.h Update the FileIO Aliases (#4186) 4 years ago
FixedWidthIntegers.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
GenericStreamMock.h Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
GenericStreamTests.cpp more fixes for Code 4 years ago
Geometry2DUtils.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
IPC.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
Interface.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
IntersectPoint.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
JSON.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
Jobs.cpp Fixes AzCore for MSVC 4 years ago
Main.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
Memory.cpp Removes Driller from AzCore 4 years ago
Module.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
ModuleTestBus.h Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
OrderedEventBenchmarks.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
OrderedEventTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
Outcome.cpp remove unnecessary ALIGN macros 4 years ago
Patching.cpp More fixes 4 years ago
RemappableId.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
Rtti.cpp Removes Driller from AzCore 4 years ago
Script.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
ScriptMath.cpp AzCore Math tests produce errors that need to be disabled in debug (#6678) 4 years ago
ScriptProperty.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
Serialization.cpp Added SerializeContext Reflection of FixedMaxPath class (#4453) 4 years ago
SerializeContextFixture.h Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
Slice.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
State.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
StatisticalProfiler.cpp Replaces handlers of TraceMessageDrillerBus with handlers of TraceMessageBus 4 years ago
Statistics.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
StreamerTests.cpp Preapre codebase for FileRequest compiletime improvements (#6192) 4 years ago
StringFunc.cpp Remove old "Integ" functionality from tests (#4688) 4 years ago
SystemFile.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
TaskTests.cpp Part 2 of enabling Atom to use TaskGraph 4 years ago
TestCatalog.cpp Update AssetManager unit tests to not interact with the disk (#5815) 4 years ago
TestCatalog.h Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
TickBusTest.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
UUIDTests.cpp Squashed commit of Procedural Prefab work (#4481) 4 years ago
XML.cpp Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
azcoretestdll_files.cmake Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
azcoretests_files.cmake AzCore Math tests produce errors that need to be disabled in debug (#6678) 4 years ago
aztestshared_files.cmake Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago