5 ms·
> The whole point of interfaces is that you're not supposed to care how a method is implemented That's exactly how you end up with O(N^4) code. Your job is to
by Tomis02 3y ago
> The whole point of interfaces is that you're not supposed to care how a method is implemented
That's exactly how you end up with O(N^4) code. Your job is to care.
- sfn42 3y agoYeah sure let's reduce my advice to a hyperbolic niche situation. This has nothing to do with performance. I'm explaining general rules for designing maintainable systems - it is possible to follow them and write performant code at the same time. It is also possible to break them if necessary. Though it usually isn't a problem at all, you're just reducing it to absurdity in order to make your point.
- weatherlight 3y agoSo you read the machine code that your code spits out? how interesting...
- hnfong 3y agoThat's not quite enough. The kernel and associated device drivers are also "interfaces" that a program binary invokes, so all the kernel code paths triggered by the program calling into the kernel should be inspected too. That said pretty sure the GP hasn't had a deep dive into whether say the C library or Linux kernel has some funny O(n^4) stuff happening.
- hnfong 3y agoBS. You wouldn't even get past your first hello world if you read all the code that underlies a one liner hello world.