Re: [julia-users] Slow eval for arrays of Any

2016-04-15 Thread Yichao Yu
On Fri, Apr 15, 2016 at 6:22 PM, 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

Re: [julia-users] Slow eval for arrays of Any

2016-04-15 Thread bogumil . kaminski
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 1 entries, and want to store it directly in Julia code as an array literal

Re: [julia-users] Slow eval for arrays of Any

2016-04-15 Thread Yichao Yu
On Fri, Apr 15, 2016 at 3:44 PM, wrote: > Could someone help me to understand why the following code works slowly and > how to make it run faster? > > function run() > # this is fast > s1 = string("x = [0", join([string(", ", i) for i in 1:256]), "]") > p1

[julia-users] Slow eval for arrays of Any

2016-04-15 Thread bogumil . kaminski
Could someone help me to understand why the following code works slowly and how to make it run faster? function run() # this is fast s1 = string("x = [0", join([string(", ", i) for i in 1:256]), "]") p1 = parse(s1) @time eval(p1) @time eval(p1) # here starts the slow