Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Well, depending on the language and compiler, you should always remember that such a simple thing as a function call for example is expensive.
Getters and setters which are doing nothing but setting and returning are pretty bullshit when thinking about this. Only if your language interpreter or compiler does not optimize these things, that is.
Garbage Collection can be a bitch too, so instantiating new objects is expensive twice. Once when making the object, once when freeing the object. -
Crost40744yBest practice is often more about readability, extension, speed to develop and maintenance than performance.
-
@craig939393 exactly. As soon as performance is key you got an own compiler for stuff (see facebook back in the days) or bad maintainability / ugly code (see twitch: ballast for a very good example)
Wow, i've been gone a while, huh?
I partly refactored that shitty emulator of mine, and after some tweaking and such, got it using a class and such instead of a bunch of global vars. However, it runs slower and got 1KB larger... how did practicing "better" coding habits make it worse?
rant