4 ms·
Or, to see what's really going on at a low level you have immediate access to the native assembly from the REPL: julia> square(x) = x^2 square (generi
by ChrisFoster 8y ago
Or, to see what's really going on at a low level you have immediate access to the native assembly from the REPL:
julia> square(x) = x^2
square (generic function with 1 method)
julia> @code_native square(1)
.text
Filename: REPL[3]
pushq %rbp
movq %rsp, %rbp
Source line: 1
imulq %rdi, %rdi
movq %rdi, %rax
popq %rbp
retq
julia> @code_native square(1.0)
.text
Filename: REPL[3]
pushq %rbp
movq %rsp, %rbp
Source line: 1
mulsd %xmm0, %xmm0
popq %rbp
retq