Schultzer

Schultzer

This is an intriguing discussion, I have always found it easier to make a decent assumption when it comes to SQL, since you’re working on sets, big table without indexes slow, many joins with suboptimal filters slow and so on since you’re literally just creating exponential queries in some cases.

But obviously there a non intuitive cases where you gotta reach for explain to understand why the query planner didn’t do what you expected it to do regardless of indexes.

But the same is true for any type of performance optimization, in the end you gotta read the assembly, which is annoying but arguably less today with AI.

Back to your question, is there no way to think about it natively. Big O tells you about access patterns into your data. So the language is completely irrelevant, I don’t even think (correct me if I’m wrong) that any language is used when teaching this academically, since pseudo code is preferable in these cases. That said immutable language have to used different data structures to guarantee the language constraints, although we still have safe mutability with constant time access in Erlang. The best way I found to learn about a language specific behaviour and complexity is to Google and the use of LLM. LLM are great for these kinda open ended question if you don’t have concrete question with a specific data structure and algorithm in mind where you can just look up the documentation.

1
Post #11
— All posts loaded —