On Sat, May 21, 2016 at 7:04 PM, FANG Colin <[email protected]> wrote:
> immutable MyType
>     x::AbstractString
>     y::Int
> end
>
>
> @time for i in 1:10^5 MyType("a", 1).y end
>
>
> In julia v0.4
>
> 0.000813 seconds (100.00 k allocations: 3.052 MB)
>
>
> In julia v0.5
>
> 0.000003 seconds (5 allocations: 176 bytes)
>
>
> It seems the memory layout for immutable which contains fields with non-bit
> types has changed in v0.5.

I believe this is due to better allocation elimination in type
inference[1]. This is exactly the case I meant by "allocation
benchmark doesn't work".

[1] https://github.com/JuliaLang/julia/pull/16021#issuecomment-213789309

>
>
> I would like to know more in details about such change, Where can I find the
> related issues, discussion in GitHub or mailing list?

Reply via email to