# Executed lines of code per line of written code

**URL:** https://discourse.julialang.org/t/executed-lines-of-code-per-line-of-written-code/29017
**Category:** Internals & Design
**Created:** [September 20, 2019, 9:18pm UTC](https://discourse.julialang.org/t/executed-lines-of-code-per-line-of-written-code/29017 "2019-09-20T21:18:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![eCS](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@eCS](https://discourse.julialang.org/u/eCS)
#### Post date: [September 20, 2019, 9:18pm UTC](https://discourse.julialang.org/t/executed-lines-of-code-per-line-of-written-code/29017/1 "2019-09-20T21:18:19Z")

</div>

I was watching Jim Keller’s talk on Moore’s Law ( [https://www.youtube.com/watch?v=oIG9ztQw2Gc&t=29m](https://www.youtube.com/watch?v=oIG9ztQw2Gc&t=29m) ) and an interesting measure came up.

 ![](https://global.discourse-cdn.com/julialang/original/3X/1/c/1c5bbfbfe62f180c12ddbda98803e1eaaa1a440d.jpeg)

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.

---

<div class="post-metadata">

### Author: ![feanor12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/feanor12/32/8212_2.png) [@feanor12](https://discourse.julialang.org/u/feanor12)
#### Post date: [September 20, 2019, 9:22pm UTC](https://discourse.julialang.org/t/executed-lines-of-code-per-line-of-written-code/29017/2 "2019-09-20T21:22:31Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [September 21, 2019, 5:16am UTC](https://discourse.julialang.org/t/executed-lines-of-code-per-line-of-written-code/29017/3 "2019-09-21T05:16:51Z")

</div>

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

```julia
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.

---

<div class="post-metadata">

### Author: ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)
#### Post date: [September 21, 2019, 5:47am UTC](https://discourse.julialang.org/t/executed-lines-of-code-per-line-of-written-code/29017/4 "2019-09-21T05:47:48Z")

</div>

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.
