slow code generation for large arrays
Hi,
Previously Matt has kindly fixed the problem of kernel construction becoming slow when the number of instructions is large (#110 (closed)). This is something different: code generation from kernels seems slow when the file is large.
This plot shows the time taken for calling loopy.generate_code_v2(knl)
against the size of the generated code. The right-most dot takes 36 seconds on my machine and the generated C code is 35 MB. The pickled kernel is here at google drive (sorry this is 13 MB which exceeds the filesize limit to upload here). Note that this kernel only has 87 instructions, but has some large constant arrays. Profiling indicates that the problem is in calling generate_array_literal
on large arrays, but I haven't been able to narrow it down further.
I'm not sure if this will become a problem eventually, but I'm wondering is there any low-hanging overheads that we can eliminate?
Thanks very much!
-TJ