Skip to main content
7 events
when toggle format what by license comment
Mar 11, 2014 at 23:57 audit First posts
Mar 11, 2014 at 23:58
Mar 5, 2014 at 21:09 comment added Brian Knoblauch @Dennis I can say that writing ASM code (directly, not compiled) for Windows goes along the lines of "mov, mov, invoke, mov, mov, invoke". With invoke being a macro that does a call wrapped by pushes/pops... Occasionally you'll do function calls in your own code but it's dwarfed by all the OS calls.
Feb 26, 2014 at 17:22 comment added Michael Kohne @Dennis - one thing to consider is that in an OO language, there may be VERY little correlation between what the programmer writes (a+b) and what code is generated (a simple add of two registers? Moves from memory first? casting, then function calls into an object's operator+?). So 'small functions' at the level of the programmer may be anything but small once rendered into machine code.
Feb 26, 2014 at 15:02 comment added Dennis ... subtraction or other business-related function. Just like loop unrolling can speed up some loops due to less overhead allocated for incrementing variables, writing larger functions probably can add some speed, provided your use case is set up for it. My concern here is more overall, seeing lots of advice to write smaller code pieces, increases this wiring, while benefiting adding readability (hopefully), and at the expense of bloat at the micro level.
Feb 26, 2014 at 15:02 comment added Dennis Coming from my question's perspective, I am not as focused on inlining per seh, but on the "codified wiring" that takes up CPU's, bus', and I/O's time process linking various pieces of code. I wonder if there is some point where there is 50% or more of wiring code and 50% of actual code you wanted to run. I imagine there is a lot of fluff even in the tightest code one can write, and it seems to be a fact of life. Much of the actual code that runs on bits and bytes level is logistics - moving values from one place to another, jumping to one place or another, and only sometimes doing adding..
Feb 26, 2014 at 1:30 review First posts
Feb 26, 2014 at 3:44
Feb 26, 2014 at 1:13 history answered user99999991 CC BY-SA 3.0