Pragmatic directives: Difference between revisions

m
Line 239:
 
=={{header|Julia}}==
Julia has a number of macros which act as compiler directives. For example, the <code>@inbounds</code> macro disables runtime checking of array bounds within a block of code marked by this macro, which sometimes improves performance. Example:
<lang julia>x = rand(100, 100)
y = rand(100, 100)
 
@inbounds begin
for i = 1:100
for j = 1:100
x[i, j] *= y[i, j]
y[i, j] += x[i, j]
end
end
end
</lang>
 
=={{header|Kotlin}}==
4,102

edits