8 Commits

Author SHA1 Message Date
Aeadoin
7f7ba2e6c2
[Cleanup] Remove unused Includes under zone files (#3162) 2023-04-01 22:55:28 -04:00
Aeadoin
31ede355a8
[Cleanup] Cleanup excessive type casting: string -> char * -> string (#3169)
* [Cleanup] Cleanup excessive type casting: string -> char * -> string

* [Cleanup] Cleanup excessive type casting: string -> char * -> string
2023-04-01 12:45:16 -04:00
Chris Miles
dfd8f84cac
[Strings] Refactor Strings Usage (#2305)
* Initial commit checkpoint

* More functions converted

* Commify

* More functions

* Fin

* Sort declarations

* Split functions between files

* Bots

* Update strings.h

* Split

* Revert find replaces

* Repository template

* Money

* Misc function

* Update CMakeLists.txt

* Saylink

* Update strings.cpp

* Swap Strings::Saylink for Saylink::Create since saylink is coupled to zone database

* API casings
2022-07-14 02:10:52 -05:00
Chris Miles
9815f50efa
[Expansion] Content Filtering Adjustments (#1910)
* Change default expansion values for ALL to -1 from 0

* Adjust content_filter_criteria

* Refactor content filtering logic

* Allow flag strings to also just be empty instead of null

* Formatting

* Editor oops
2022-01-02 20:52:29 -06:00
Michael Cook (mackal)
dba3010c89
[Strings] Split String Optimizations (#1325)
* Switch the 2 split calls to SplitString

* Nuke duplicate split in favor of SplitString #1263

* Add a test for SplitString

* Optimize SplitString

Benchmarking:
--------------------------------------------------------------
Benchmark                       Time           CPU Iterations
--------------------------------------------------------------
bench_oldsplit               5201 ns       5201 ns     129500
bench_split                  1269 ns       1269 ns     548906

This is splitting a VERY long SpecialAbilities string. This is ~75%
speed up.
2021-04-22 23:36:39 -05:00
Michael Cook (mackal)
0534a2c6be
Switch scheduled hot zone check to search instead of split (#1313)
Using search_deliminated_string here is significantly faster than
splitting, most likely because of dynamic memory management

Some tests on my system:

----------------------------------------------------
Benchmark             Time           CPU Iterations
----------------------------------------------------
bench_split         864 ns        864 ns     807922
bench_search         35 ns         35 ns   20265205

This test was a case where the string was present somewhere in the
middle which gave a ~96% speed up

----------------------------------------------------
Benchmark             Time           CPU Iterations
----------------------------------------------------
bench_split         936 ns        936 ns     725518
bench_search         61 ns         61 ns   11156359

This test was when the string was not present, which will be the vast
majority of times this is actually checked, was ~93% speed up
2021-04-07 01:17:30 -05:00
hg
10b1f7e1ca
Add missing includes to fix windows compile (#1314) 2021-03-29 18:09:36 -05:00
Chris Miles
7aa5308f9c
[Scheduler] Event scheduler implementation (#1257)
* Event scheduler implementation

* Create 2021_02_17_server_scheduled_events.sql

* Tweak

* Remove unused event [skip ci]

* Cleanup [skip ci]

* PR adjustments

* Database manifest
2021-03-29 02:52:57 -05:00