Preferences

I love how easy it is to view the machine code for a function. Julia actually ships with a handful of these introspection macros: https://docs.julialang.org/en/v1/devdocs/reflection/#Interme.... They are invaluable when it comes to optimization.

Indeed, inspecting typed code, lowered code, llvm ir, and native code from the REPL is great. Combine that with @benchmark for microbenchmarking and it's amazing.

Note that the 'manual dispatch' is optimized out in a very early stage:

    julia> @code_typed foo(1)
    CodeInfo(
    1 ─     return 2
    ) => Int64
So, no need to look at assembly here.
Prof. Alan Edelman gave a nice lecture about this a couple of days ago https://www.youtube.com/watch?v=IuOXXQR7dAo

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal