Skip to main content
identifying computer/human speed elements
Source Link
Dennis
  • 8.3k
  • 6
  • 38
  • 71

[computer-time element]

Does Refactoring towards Looser Coupling and Smaller Functions affect Speed of Code?

Yes, it does. But it is up to interpreters, compilers, and JIT-compilers to strip down this "seam/wiring" code, and some do it better than others, but some don't.

Multiple-file concern adds to I/O overhead, so that affects speed quite a bit as well (in computer-time).

[human-speed element]

(andAnd should I care?)

no you shouldn't care. Computers and circuits are plenty fast these days, and other factors take over, such as network latency, database I/O, and caching. So

So 2x - 4x slow down in the native code execution itself will often get drowned out by those other factors.

As far as multiple-file loading, that is often being taken care of by various caching solutions. It may take more time to load things up and merge them up the first time, but for every next time, for static files, caching does work as if a single file is being loaded. Caching comes as a solution to multiple-file loading.

Does Refactoring towards Looser Coupling and Smaller Functions affect Speed of Code?

Yes, it does. But it is up to interpreters, compilers, and JIT-compilers to strip down this "seam/wiring" code, and some do it better than others, but some don't.

(and should I care)

no you shouldn't care. Computers and circuits are plenty fast these days, and other factors take over, such as network latency, database I/O, and caching. So 2x - 4x slow down in the native code execution itself will often get drowned out by those other factors.

[computer-time element]

Does Refactoring towards Looser Coupling and Smaller Functions affect Speed of Code?

Yes, it does. But it is up to interpreters, compilers, and JIT-compilers to strip down this "seam/wiring" code, and some do it better than others, but some don't.

Multiple-file concern adds to I/O overhead, so that affects speed quite a bit as well (in computer-time).

[human-speed element]

(And should I care?)

no you shouldn't care. Computers and circuits are plenty fast these days, and other factors take over, such as network latency, database I/O, and caching.

So 2x - 4x slow down in the native code execution itself will often get drowned out by those other factors.

As far as multiple-file loading, that is often being taken care of by various caching solutions. It may take more time to load things up and merge them up the first time, but for every next time, for static files, caching does work as if a single file is being loaded. Caching comes as a solution to multiple-file loading.

Source Link
Dennis
  • 8.3k
  • 6
  • 38
  • 71

Does Refactoring towards Looser Coupling and Smaller Functions affect Speed of Code?

Yes, it does. But it is up to interpreters, compilers, and JIT-compilers to strip down this "seam/wiring" code, and some do it better than others, but some don't.

(and should I care)

no you shouldn't care. Computers and circuits are plenty fast these days, and other factors take over, such as network latency, database I/O, and caching. So 2x - 4x slow down in the native code execution itself will often get drowned out by those other factors.