Earlier quoted context omitted.
> Also one separate function being different than the operator is not a language level feature, it is how that one library data structure is made. That's not so much the point: the point is that even when calling a regular method conveniently as ptr->methodname() , you are calling the method name not on a pointer expression but on a value expression. ptr->methodname() is effectively (*ptr).methodname() .
That's not so much the point: It is the point since you compared two things that have different uses, then said you can't call an operator on a pointer, which is wrong.
Understanding the Odin programming language
161–163 of 163 posts
Re: Understanding the Odin programming language
#162Earlier quoted context omitted.
> Also one separate function being different than the operator is not a language level feature, it is how that one library data structure is made. That's not so much the point: the point is that even when calling a regular method conveniently as ptr->methodname() , you are calling the method name not on a pointer expression but on a value expression. ptr->methodname() is effectively (*ptr).methodname() .
That's not so much the point: It is the point since you compared two things that have different uses, then said you can't call an operator on a pointer, which is wrong.
Re: Understanding the Odin programming language
#163Earlier quoted context omitted.
> Again you can make these bold statements but saying pointer chasing has no performance impact is what people say when they don't understand the cost of TLB misses and caches misses. You are right to call this out but I did not mean to imply that it would not increase load on the cache at all . The most important optimization is keeping data structures simple, flat, and coherent. Making many micro optimizations can…
If you blindly embed everything by value religiously, you deserve neither flexibility nor correctness nor performance. I don't know what 'deserve' is supposed to mean, but I just showed how to get all three. don't forget to group data by access patterns and write patterns Values on the stack are going to be grouped together and they are going to be in cache. You realize using two heap allocations means twice the free…