mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-16 16:12:14 +11:00
📚🚧
This commit is contained in:
parent
b7d75bfe74
commit
47e84ced7a
1 changed files with 5 additions and 5 deletions
|
|
@ -10,13 +10,13 @@ this parallel hashmap implementation is the basis of CCash, its where all the us
|
|||
### 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.
|
||||
.png)
|
||||
as the graph demonstrates, regardless of size GetBal remains consistent at ~39ns on my 3700x single threaded.
|
||||
as the graph demonstrates, regardless of size `GetBal()` remains consistent at ~39ns on my 3700x single threaded.
|
||||
## [xxHash](https://github.com/Cyan4973/xxHash)
|
||||
xxhash is used for both hashing of passwords for storage aswell as the usernames for indexing the phmap.
|
||||
xxhash is used for both hashing of passwords for storage aswell as the usernames for indexing the phmap, its speed is ridiculous at faster then `memcpy` rates of Gb/s.
|
||||
## [Base64](https://github.com/aklomp/base64)
|
||||
base64 decoding is required for Basic Auth so I used this clean and fast solution found [here](https://github.com/aklomp/base64) which uses SIMD.
|
||||
base64 decoding is required for Basic Auth so I used this clean and fast solution found [here](https://github.com/aklomp/base64) which uses SIMD if available.
|
||||
## [Simdjson](https://github.com/simdjson/simdjson)
|
||||
simdjson was the fastest JSON parsing I could find, I found its SIMD and OnDemand parsing attractive so its used for request parsing.
|
||||
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
|
||||
|
|
@ -27,7 +27,7 @@ every `n` minutes, a configurable amount at launch, CCash will save.
|
|||
### Changes
|
||||
for the above two cases, it will only save if changes have been made since last commit.
|
||||
## Multi-threading support
|
||||
considering phmap and drogon both massively benefit from multi threaded it seemed obvious that the entire program should aswell, this is enabled by default and manually settable at `MULTI_THREADED`. Below are some graphs visualizing the gain of doing so:
|
||||
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:
|
||||
<!-- graph -->
|
||||
## Backwards Compatible API
|
||||
versioning is implemented by the endpoints path, for example `/v1`. Breaking changes will ideally be sparse and backwards compatability will be maintained, for example ideally API `v3` instance can still run `v1` endpoints.
|
||||
Loading…
Reference in a new issue