On Fri, Apr 15, 2016 at 6:22 PM, <[email protected]> wrote: > This I understand - thank you. > However, as I have written in my first post eval is only an example showing > the problem. > The real use case is when we have some constant reference data, eg. list of > first names that has 10000 entries, and want to store it directly in Julia > code as an array literal (and not in a separate file from which it is > loaded). > Then the problem arises if you include such a file.
Right, and you just shouldn't do it at all. A programming language parser and interpreter needs to do far more things than a data storage format and you shouldn't use one as the other since they are not optimized for the other case. I'm not sure what takes the most time in this case but for one thing, you are asking the interpreter to figure out the types of the array given all the element. This is going to be expensive. Python won't have this problem since it doesn't have any builtin concept of typed container (not automatically or using the syntax you have anyway...) > > Thank you, > Bogumil
