branchrust_reboot/main/buildcommand_allocscancel
7 Commits over 0 Days - ∞cph!
Add(tests): add StringExtensionTests
Currently only covers SplitQuotesStrings. Baseline allocs - 33allocs, 1.8KB
Tests: ran tests
Optim: fully remove function temporary
Saves 1 alloc (63 allocs, 3.9KB)
Tests: ran tests
Update(tests): add case or command with no args
Tests: ran unit tests
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
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
Update(tests): also validate uppercase commands are resolved properly
Tests: ran unit tests
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)