From dc399184cf06e4aca8f568b2cdc1ec28f4abdfef Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Thu, 15 Jul 2021 20:18:38 -0700 Subject: [PATCH] :books::construction: --- docs/features/implementation.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/features/implementation.md b/docs/features/implementation.md index ac6ce43..1ccc3b2 100644 --- a/docs/features/implementation.md +++ b/docs/features/implementation.md @@ -5,9 +5,9 @@ -### STD vs phmap +#### STD vs phmap this parallel hashmap implementation is the basis of CCash, its where all the user data is stored, compared to the STD's `std::unordered_map` its much faster, this, multi threading support, and more can be found in the [writeup](https://greg7mdp.github.io/parallel-hashmap/). -### Scalability +#### Scalability below is `GetBal()` being called where `x` axis grows with # of users reaching 10 million users, `y` axis is time in ns. The name given is random between 0 and max users at that time as to provide more accurate results. ![image](GetBal().png) as the graph demonstrates, regardless of size `GetBal()` remains consistent at ~39ns on my 3700x single threaded. @@ -20,11 +20,11 @@ simdjson was the fastest JSON parsing I could find, its used for request parsing ## [Drogon webframework](https://github.com/an-tao/drogon) at the time of making this doc Drogon is the 3rd fastest web framework as per [this](https://www.techempower.com/benchmarks/#section=data-r20&hw=ph&test=composite) sites metric of measuring web frameworks, it also has multi threading support. ## Sparse saving -### Saving on close +#### Saving on close when the program is interupted with CONTROL + C it will save before closing the webserver, **it will not however save during a crash**. -### Auto Saving +#### Auto Saving every `n` minutes, a configurable amount at launch, CCash will save. -### Changes +#### Changes for the above two cases, it will only save to disk if changes have been made since last save. ## Multi-threading support considering phmap and drogon both massively benefit from being multi-threaded it seemed obvious that the entire program should be, this is enabled by default and manually settable at `MULTI_THREADED`. Below are some graphs visualizing the gain of doing so: