970 karma · joined March 11, 2022
that's a very good point.
> Otherwise I really like the GPU derivative form where N instructions are ready to go and the hardware picks one where the prerequisite memory access has completed, despite that being variable
Hmm, isn't that OOO (out of order) execution? And isn't that something GPUs explicitly don't do? (AFAIUI)
And where is the evidence it's related to wikipedia?
edit: I repeat my request more strongly. I've looked more and even "intersectional scientific method" gets almost nothing except a couple of posts on twitter claiming the same and a website https://battlepenguin.com/politics/wikipedia-is-a-source-of-... which doesn't back anything up - are you affiliated with either of these?
I am wondering if you are deliberately spreading FUD
I've done much better. Think sticking a a cache in front of a database with seriously complex queries. Yes you need to be be aware of staleness, no it's not a magic wand, but it delivered massive improvements.
> When the cache was put in place it accounted for 40% of run time
If looking shit up in a hash table, at a few hundred or thousand cpu ticks, cost 40% of your runtime then I smell PEBKAC[1], not cache problems.
[1] Not you personally but someone
Maybe. I've never found it a problem, but maybe. When I've added a cache, the cache comes with instrumentation for exactly that.
> Yes, but by doing this they also tremendously increased the complexity of the project
It depends. EG if you don't need to worry too much about cache invalidation, adding caching can be as simple as adding a single function call eg like python's lru_cache. It depends on the use case.
> Caches, being cheap imitations of ACID 'compliant' databases
No they're not, not remotely.
> which themselves cheat all day every day
I don't believe a word of this, have you any actual evidence (other than I believe Oracle's serialisable is actually snapshot isolation IIRC)
> Half of a decision can be made with one version of a piece of data and the other half with another, resulting in undefined behavior. In a system that asserts that A = !B you can have an interaction that did some of the activities for A and some of the ones for B
And this just makes no sense, you're claiming that databases are not producing the results they should, if that's the case then I don't believe you understand transaction isolation levels or indeed how database queries work, in which case you have problems other than and larger than caching.
This whole thread s just getting weirder.
> If real-time or near real-time is the expectation, then avoiding the cache usage
Because looking up a precalculated result in a hash table is so much slower than not looking it up? And what, recalculating it instead is faster than an O(1) hash table lookup? If so,why are you caching?
I am just getting more confused by what people are saying here.
> Because of the locality aspect, people will assume that it's 'free' to look up a value multiple times instead of passing these data dependencies between the relevant methods
what does that even mean? What does 'data dependencies' mean specicially?
> then you can end up evicting data in the middle of a transaction
So in the middle of a transaction, instead of looking up data from a key - very cheap - you should do ... what? Recalculate it instead?
> The less obvious consequence is now you have concurrency bugs, because the code assumes that decisions made about the data will go the same way on each call, but due to eviction, two halves of the transaction may make conflicting decisions with undefined behavior
Assuming I even understand this, you are saying where there's concurrencty there's a risk of pulling stale data out of a cache. Well, true. That's just something you have to be careful of. Add a Tx reference to the cache key.
> Once you introduce caching you poison the performance well.
Not my experience at all. I can't understand why you're saying this.
> Flame charts lie when cache is used
How so?
> and after people rely on the cache it is lying in the other direction when the cache is off, because you're calling that path 5 times now and it's swamping other bottlenecks
I've no idea what this means
> This is what I really mean when I say it's a weapon of last resort. Because once you use it, it attempts to take any other options off the table
Heh! Absolutely not! Other optimisations are orthogonal to caching IME:
Better algo - orthogonal
Go lower level - orthogonal
Go multicore - orthogonal
Noobish SQL query is begging for a rewrite - orthogonal
Use L1/2/3/ chip cache better, or RAM, by careful data layout - orthogonal
Use a better library - orthogonal
Use better data structure eg. than linked list - orthogonal
Then you have a useful cache sitting there unused unless at peak time - why? Just enable it always. This makes no sense.
> Caching is a weapon of last resort. In most cases it is the last major performance improvement
...is wrong. It is one of the very first things I reach for because it is the most effective and simplest, once you've eliminated O(n^2) behaviour etc. It's not a magic wand but nothing is.
Edit: a little digging and "A tilde is a multi-user online system designed to be a "home" for users by providing services such as shell access via SSH, email, small site hosting (on www, gopher, gemini), chat, or other programs. It is a loose term, akin to a public access unix systems (a.k.a. pubnixes), but with some connotations of a small community" https://tilde.wiki/wiki/Tilde
eg. Chamomile - still used for bad stomachs (is a costive), whether it works on herpes simplex seems really dubious.
[1] admittedly in some cases you can't for various reasons, including bosses that won't listen.
The ones I will never use are those which have a voice you can't turn off. Having to listen to those as I queue nearby, all I want for xmas is a HIMARS.
Given that, your 2nd paper is interesting and supports you. The first seems (emphaisis: seems) to back up findings that most damage is done to the adolescent developing brain with cannabis, but still reading it.
Edit: 2nd paper doesn't seem to ask when cannabis use started so it's quite possible the damage was done in adolescence, not adulthood:
"Cognitive tests were conducted at ages 7, 9, and 11 using the Wechsler Intelligence Scale for Children-Revised and again at age 45 using the Wechsler Adult Intelligence Scale-IV. Additional neuropsychological tests were administered to measure the participants’ verbal learning, attention, memory, processing speed, and more"
so tested as pre-teens then at age 45. That seems a very big gap between them.
I don't believe that is true, and excess water can be dangerous by causing hyponatremia.