General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Brent Jacobs
Low Level
comments
Comments by "Brent Jacobs" (@br3nto) on "Low Level" channel.
@marcossidoruk8033 you’re foo.bar() example is a little hyperbolic. It’s no surprise what happens when the debugger hits that line because that’s just polymorphism works. However, I could argue using your logic that any and all function/method calls obfuscates control flow regardless of whether there is one or many implementations of that function/method that may get executed as I don’t know what the method/function is doing until it executes or until I look at the code.
4
@monochromeart7311 what about Rust’s traits? I assume that this also uses vtables too.
3
@marcossidoruk8033 actually that’s an interesting point you make about functions/methods needlessly being split. I don’t necessarily agree that it’s always bad, however, I do often find that functions/methods contain the wrong code and hide possible simplifications that may be possible if the code were in a single large method. In these cases, pushing certain code higher in the call chain, or moving all the code back into the calling code, makes the simplification obvious and possible.
2
7:00 so are you saying this is only a performance problem when the child’s vtable and related code aren’t loaded into RAM? If that’s the case, if there was a mechanism to indicate to the program which vtables to load into the cache, then in theory the performance difference between the C version would be similar, assuming that the solution using vtables is similar to the C implementation of the example code in this vid.
1
Is Lua just Ruby? Or Ruby just Lua? They look quite same same on the surface.
1