Executed lines of code per line of written code

I was watching Jim Keller’s talk on Moore’s Law ( Jim Keller: Moore’s Law is Not Dead - YouTube ) and an interesting measure came up.

Is there an estimate for Julia?
I think @code_native could be handy here but I’m not sure if it would cover all the way to the bottom of the matter.

1 Like

Could this be checked with @code_native? I think this ignores the compiler, but is this counted in this measure.

Note that in Julia this also depends on the data (at least its type), not only the code, as various concrete types would generate different native code. Eg something as innocuous as

f(x) = exp(x) - one(x)

will generate different native code when called with Float64, a Matrix, or a ForwardDiff.Dual.

Then there are of course source-to-source transformations like Zygote, again producing a lot of native code for the same amount of Julia code.

Also, this is a kind of useless chart since it is caused by a combination of 2 opposite things. One is higher language inefficiency, and the other is higher amounts of expressiveness. I’m very unclear why you would want to be measuring both at the same time.