Skip to content

Commit 61fb6cd

Browse files
committed
jit macro
1 parent 69afdd6 commit 61fb6cd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/utils.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,18 @@ function jacobian(m,x)
153153
end
154154
J'
155155
end
156+
157+
"""
158+
@jit ...
159+
160+
The `@jit` annotation can be applied to any code, and the code will be compiled
161+
for performance.
162+
163+
@jit f(x) = @jit(x) + @jit(x)
164+
165+
Note that compilation happens regardless of the `@jit` macro, so it should only
166+
be used for aesthetic purposes, or by recovering Python users.
167+
"""
168+
macro jit(ex)
169+
esc(ex)
170+
end

0 commit comments

Comments
 (0)