Core.tuple() warntype

Just search for dicussions with examples, eg

2 Likes

what will happen once the code cached got filled up?
would it crash Julia?
Or, the cache would be reset? If it’s the case, the worst thing we get is (the time used in the) re-compilation of generated functions.

Sorry, I wasn’t very clear. What I meant by “code cache” was the L1 instruction cache of the CPU. This might be something like 32 kilobytes, so if you code-generate a length-1000 tuple, and each element results in 32 bytes of code, then each time the function runs, all other functions will be pushed out of the cache.

Nothing will crash, all that will happen is that the next few function calls will take a few extra nanoseconds as instructions are fetched from the next level cache. The net effect is that your program runs slower even though @btime says that your function is faster.

1 Like