julia
7d8ba924 - Inline `_log` to avoid passing symbol argument. (#51232)

Commit
2 years ago
Inline `_log` to avoid passing symbol argument. (#51232) This reduces callsite code from ```julia julia> foo(x) = log(x) foo (generic function with 1 method) julia> @code_native syntax=:intel debuginfo=:none foo(2.3) .text .file "foo" .globl julia_foo_2627 # -- Begin function julia_foo_2627 .p2align 4, 0x90 .type julia_foo_2627,@function julia_foo_2627: # @julia_foo_2627 ; Function Signature: foo(Float64) #DEBUG_VALUE: foo:x <- $xmm0 push rbp mov rbp, rsp movabs rdi, offset ".Ljl_sym#log#2632.jit" movabs rax, offset j__log_2631 call rax pop rbp ret ``` to ```julia julia> @code_native syntax=:intel debuginfo=:none foo(2.3) .text .file "foo" .globl julia_foo_10446 # -- Begin function julia_foo_10446 .p2align 4, 0x90 .type julia_foo_10446,@function julia_foo_10446: # @julia_foo_10446 ; Function Signature: foo(Float64) #DEBUG_VALUE: foo:x <- $xmm0 push rbp mov rbp, rsp movabs rax, offset j_log_10450 call rax pop rbp ret ``` Note that we no longer have ```asm movabs rdi, offset ".Ljl_sym#log#2632.jit"` ``` saving an instruction at every call site.
Author
Parents
Loading