summaryrefslogtreecommitdiffstats
path: root/src/cache.c
Commit message (Collapse)AuthorAgeFilesLines
* cleanup and optimizations.algos-ld1-1.0Gravatar Gediminas Jakutis 2021-03-151-9/+5
| | | | | | | | | · No longer rewinding a stream being split, just to skip half through it again, which was not only stupid, but inneficient. · No longer using "index" anywhere when working with lists, lest we get accused of not actually doing lists. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* refactor && improve.Gravatar Gediminas Jakutis 2021-03-101-84/+13
| | | | | | Make code more reusable and generic while preparing to add uncached ops. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* straight up code refactor.Gravatar Gediminas Jakutis 2021-03-031-55/+15
| | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* now with cached list handling!Gravatar Gediminas Jakutis 2021-02-281-11/+49
| | | | | | | Implemented the last two cached list handling functions required to get this party started. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* move readfile implementation to cache.Gravatar Gediminas Jakutis 2021-02-251-1/+37
| | | | | | | | Reading and entire file in is only done for caching, uncached streams will never do that, so it makes sense to move it from stream function collection to cache functions, making it static along the way. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* get rid of gratuitous extra assignments.Gravatar Gediminas Jakutis 2021-02-251-8/+1
| | | | | | | Since we use a union now, the extra assignments are now pointless, even with -O0 and such. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* get rid of pnode, t'was unused.Gravatar Gediminas Jakutis 2021-02-251-6/+3
| | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* in-memory array sorting: GET!Gravatar Gediminas Jakutis 2021-02-211-7/+8
| | | | | | | lists need a bit more work and after that, in-file should shortly follow. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* Most of sorting an array in memory is wired up.Gravatar Gediminas Jakutis 2021-02-171-11/+33
| | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* cease inefficient /dev/urandom fiddling.Gravatar Gediminas Jakutis 2021-02-151-2/+2
| | | | | | | Instead of reading /dev/urandom like a file (i.e. overhead / extra syscalls, etc.), just use getrandom(2) directly, lol. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* now with generating lists!Gravatar Gediminas Jakutis 2021-02-151-11/+52
| | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* continue the overhaul.Gravatar Gediminas Jakutis 2021-02-111-37/+26
| | | | | | we can finally create a basic array input data file too! Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* A major overhaul of the whole thing.Gravatar Gediminas Jakutis 2021-02-091-48/+112
| | | | | | | | | | It has come to my attention that previously, the project was built on top of some *very* incorrect assumptions. This patch mostly addresses that. And while it does NOT leave the project in otherwise working state, it does weed out most, if not all, of effects of previously incorrect assumptions, so it can be built the right way from here on forth. Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* cache I/O implementation and fixes.Gravatar Gediminas Jakutis 2020-03-271-3/+89
| | | | Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
* we print error messages now, bois.Gravatar Gediminas Jakutis 2020-03-191-6/+6
|
* bolt on data generation, kind of.Gravatar Gediminas Jakutis 2020-03-101-0/+56
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>