you see code with tons of indirect function calls,
lots of wrapper functions (ie one function massages
some arguments a bit and then just calls another
function), and no, it's not inlined because it's of
ten all about interfacing between different library
levels (webkit, various font rendering libraries, low-
level drivers for "in memory" vs "on screen" yadda
yadda)
can anyone speak to these criticisms?
i often write code that starts as this:
function ae(arr) {
//do
//first
//something to arr
//do
// second
// something to arr
//do
// third
// something to arr
return arr
}
then refactor it as:
function first(arr) {
// do
// something
return arr }
function sec(arr) {
// do
// something
return arr }
function third(arr) {
// do
// something
return arr }
function ae(arr) {
arr=first(arr)
arr=second(arr)
arr=third(arr)
return arr
}
is this what torvalds is referring to?
i thought i had done 'extensive' research on the perf burden of function calls and found them to be negligible so i decided to refactor for the sake of readability
what's best practices in regard to indirect function calls, wrapper functions, and inlining?
i often write code that starts as this:
then refactor it as: is this what torvalds is referring to?i thought i had done 'extensive' research on the perf burden of function calls and found them to be negligible so i decided to refactor for the sake of readability
what's best practices in regard to indirect function calls, wrapper functions, and inlining?