oxinabox / MagneticReadHead.jl

A cassette-based debugger | The Other Debugger
MIT License
50 stars 6 forks source link

Use compiler tools to workout what is defined where #74

Closed oxinabox closed 5 years ago

oxinabox commented 5 years ago

Actionizes #73 This is branching off #70 In theory this should improve compile-times. Though it is a fiddly trade-off. We are doing more work to hopefully do less work.

Right now: first run;

@time @run summer((rand(4000)));
 16.506276 seconds (72.55 M allocations: 3.264 GiB, 7.98% gc time)

Note that on #70 we have

  7.521864 seconds (40.63 M allocations: 1.658 GiB, 10.85% gc time)

And with this PR

julia> @time @run TimerOutputs.print_header(stdout, 0.5, 0.1, 3, 3, 7, false, true, 11, true, "oio")
 146.131464 seconds (584.86 M allocations: 24.376 GiB, 11.01% gc time)

With just #70

julia> @time @run TimerOutputs.print_header(stdout, 0.5, 0.1, 3, 3, 7, false, true, 11, true, "oio")
 -----------------------------------------------
 130.389314 seconds (449.39 M allocations: 17.303 GiB, 10.31% gc time)
oxinabox commented 5 years ago

With the latest refinement we are now "down" to

julia> @time @run TimerOutputs.print_header(stdout, 0.5, 0.1, 3, 3, 7, false, true, 11, true, "oio")
153.022384 seconds (585.88 M allocations: 24.435 GiB, 11.27% gc time)

Note before we were not removing duplicates so it doesn't count.

oxinabox commented 5 years ago

I should come back and fix and merge this.

oxinabox commented 5 years ago

Now that this is passing tests, I am kinda ok to merge it even though it make the performance worse as it is the correct way to do this.

I have some ideas for more optimizations, but they can happen later

julia> @time @run summer((rand(4000)));
 17.561403 seconds (67.94 M allocations: 2.989 GiB, 8.27% gc time)

julia> using TimerOutputs

julia> @time @run TimerOutputs.print_header(stdout, 0.5, 0.1, 3, 3, 7, false, true, 11, true, "oio")
 -----------------------------------------------197.018612 seconds (537.65 M allocations: 21.873 GiB, 12.80% gc time)

julia> @time @run TimerOutputs.print_header(stdout, 0.5, 0.1, 3, 3, 7, false, true, 11, true, "oio")
 -----------------------------------------------  0.056495 seconds (73.03 k allocations: 3.838 MiB)