Blog post: Julia's latency: Past, present and future

For what it’s worth, there is a proposal for a redesign which could enable redefinition of types, according to the author.

2 Likes

Prior to 1.9 it precompilation cached typed IR (after running type inference and Julia optimizations). In 1.9, it’s native code.

Thanks for posting this comment! I used to have precompile statements in eg BandedMatrices.jl but at one point I got rid of them as I realised that the benefits were very small. But it sounds like the game has changed with 1.9?

Yeah. Computation heavy packages massively improve with 1.9. For example, the first matmul time (not including load time) in Julia 1.9 is 0.2 seconds compared to 1. seconds in 1.8

One really helpful thing there would probably to rename that package. Even though I can remember that it exists, I can certainly never remember the exact name (all I can remember is "something that starts with c and then who knows), how to spell it or pronounce it. As silly as this is, I think an easier name would make the package quite a bit less scary and more discoverable for more users.

26 Likes

Especially given the background. Look it up on the web and it promises “a gigantic entity worshipped by cultists”.

3 Likes

just some subjective counterpoint; I enjoy whimsical names :slight_smile: , I would be a teense sad to see Cthulhu.jl renamed to another generic InferenceInspector.jl or what have you

16 Likes

I thought this Lovecraft stuff had gone fully mainstream. The spelling can easily throw you, though.

6 Likes

A package rename might be defensible as Cthulhu stabilizes, because it might no longer be “The slow descent into madness” but instead “A gentle meditation to enlightenment”. So maybe TypeGuru.jl? Typefulness.jl? Or if descriptive is preferred over whimsy, perhaps TypeIntrospection.jl or just Introspection.jl?

8 Likes

What are the exact bad consequences of this? The blog’s example annotates an argument with ::MyType so it doesn’t seem like type piracy that would interfere with code outside your MyType package. I can see that sort of code hitting a bunch of MethodErrors at the overly wide variety of input types, but I don’t understand how it relates to latency, the way type piracy, poor inferability, and excessive dependencies were explained.

For a slight change of tack (and author), I propose “TellTaleHeart.jl”, then, because the package helps in telling where the (performance) skeletons are buried. :sweat_smile:

1 Like

I can not agree more with this point. I tried to remember the word several times. Each time I failed! Bang!

2 Likes

In the BandedMatrices context, the gains were visible in Precompile basic algebra operations by jishnub · Pull Request #283 · JuliaLinearAlgebra/BandedMatrices.jl · GitHub, where the latency in basic algebra operations were eliminated almost entirely.

Yeah, I would also be sad at the renaming. For me, having it called Cthulhu.jl makes it much more memorable. I have a much bigger problem with generic names in which some noun or adjective of the name is replaced by some synonym in my mind.

9 Likes

I don’t know, doubt it, the trend is slimming the sysimage/Base. And this is only used interactively by developers.

@davidanthoff How about a trivial (doc) change (would it even be ok for 1.9?):

julia> @code_warntype 1+1
MethodInstance for +(::Int64, ::Int64)  NOTE, a better tool to use is @descend from Cthulhu.jl package
[..]

[And eventually deprecate it, and just show the hint?]

Are these code_* macros ever used unless interactively? I’m thinking, is it even ok to add hints to the (bottom) of @code_native (the one I use most) output, or would the output be parsed by some code, and the change would screw it up?