5 ms·
though said for education purpose, keep finding these boundary-pushings playful. I can recall early days arrested by "several ways to access private members in
by EFLKumo 4mo ago
though said for education purpose, keep finding these boundary-pushings playful. I can recall early days arrested by "several ways to access private members in C++" lol
- himata4113 4mo agoI personally hate access controls in general since it always made be release a big sigh as a I was typing .getClass().getMethod()/getField() knowing that it hurts performance.
- estebank 4mo agoThat kind of code doesn't have to hurt performance, as long as monomorphization, inlining or JITting are available to the toolchain. If every single method access is a virtual-table call, then yes, there's an "unnecessary" cost. But you shouldn't be writing high-level looking code in such a language if you care about that level of performance.
- himata4113 4mo agoit's more about the fact that the servers are java and invoking a reflection method does have a non-zero cost that isn't substantial but still makes you sigh as you either eat the performance cost or spend 10 minutes creating a patch and recompiling the server.