branchrust_reboot/main/buildcommand_allocscancel

33 Commits over 0 Days - Infinitycph!

7 Days Ago
Optim: get rid of a string alloc in teleportpos Forgot it when expanding string view compatibility Tests: used enable_marker_teleport
7 Days Ago
Bugfix: fix invalid trimming in ToVector(StringView) - StringView - add 2- and 3-char Trim overloads - add a unit test Tests: unit tests + enable_marker_teleport
7 Days Ago
Merge: from main
14 Days Ago
Merge: from main
15 Days Ago
Update: Codegen Tests: builds
15 Days Ago
Merge: from main Needs codegen
15 Days Ago
Optim: reimplement all Arg.Get* via GetStringView Avoids allocations in the GetString fallback Tests: unit tests
15 Days Ago
Update: add StringView-to-numeric extensions Tests: ran unit tests
15 Days Ago
Clean(tests): get rid of redundant profiling code Tests: builds
15 Days Ago
Optim: BuildCommand - remove another Substring alloc via StringView Down to 3 allocs/0.34KB per call Tests: ran a couple commands with and without args
15 Days Ago
Optim: ConsoleSystem.Index uses StringView internally to avoid allocations Tests: booted into craggy, ran a couple commands (short and fully qualified)
15 Days Ago
Optim: Arg.Args is now a StringView[] Most of the code uses GetString to lazy alloc a string. BuildCommand is now 4 allocs/0.4KB per call Tests: unit tests, booted into craggy and set a couple variables, tested crosshair clientvars
15 Days Ago
Optim: Arg.FullString is now a StringView - updated CodeGenerator to support StringView params - ran codegen Saves an allocation(once I’m done with conversion). Currently at 12 allocs/0.85KB per call Tests: booted into cragy, tried echo and say commands
15 Days Ago
Update: add StringView.Trim(char) overload - add unit tests Tests: ran unit tests
15 Days Ago
Optim: add StringView.SplitQuotesStrings overload - Refactored logic to work on StringViews internally Only has 1 alloc(StringView[]). Using it is blocked on whether I'll be able to convert Arg.Args field to StringView[] or not Tests: none
15 Days Ago
Update: add StringView.EndsWith(StringView) - added trivial unit test Tests: ran unit tests
15 Days Ago
Merge: from main
16 Days Ago
Update: add StringView.Trim - added unit test Tests: ran unit test
16 Days Ago
Update: implemented StringView.Replace - added unit tests Tests: ran unit test
16 Days Ago
Optim: SplitQuotesStrings - use pooled list internally - also gave it a small clean, as it was a bit horrendous looking code Saves us 3 allocs - down to 6 allocs, 0.25KB per call Tests: unit tests
16 Days Ago
Optim: SplitQuotesStrings - replace regex usage with hand-rolled processing Saves us 24 allocs per call - now 9 allocs, 0.5KB per call. As a bonus, looks to be 3-5x times faster Tests: ran unit tests
16 Days Ago
Update(tests): more failing edge cases Tests: ran unit tests, old logic passes
16 Days Ago
Update(tests): add a couple more trimming edge cases Discovered during rewrite Tests: ran unit tests
17 Days Ago
Merge: from main
20 Days Ago
Update(tests): even more edge case unit tests - escaped double quotes - split escaped double quotes Tests: ran tests
20 Days Ago
Update(tests): add a couple more edge case unit tests - torn nested string - single quotes nested - torn single quote nested - Added a whitespace to first nested string in all tests to validate trimming Tests: ran unit tests
20 Days Ago
Add(tests): add StringExtensionTests Currently only covers SplitQuotesStrings. Baseline allocs - 33allocs, 1.8KB Tests: ran tests
20 Days Ago
Optim: fully remove function temporary Saves 1 alloc (63 allocs, 3.9KB) Tests: ran tests
20 Days Ago
Update(tests): add case or command with no args Tests: ran unit tests
20 Days Ago
Optim: don't recreate temporary klass and function substrings, fetch the full name at the end Saves 2 allocs (64 allocs, 4.2KB) Tests: ran tests
20 Days Ago
Optim: skip lowercasing command class and function names We rely on case-insensitivite comparator for map lookups - saves 2 allocs (66 allocs, 4.3KB) Tests: ran unit and perf tests
20 Days Ago
Update(tests): also validate uppercase commands are resolved properly Tests: ran unit tests
20 Days Ago
New(tests): add basic Facepunch.Console.CommandTests tests(3 unit, 1 perf) Need it before I start optimizing out allocs Tests: ran tests, they pass and show allocs (68 allocs, 4.4KB total for test string)