Re: [julia-users] Re: Code starting to be slow after 30 min of execution

2015-05-01 Thread Tim Holy
It's great that you're pursuing this. I confess I don't know the internal details of anonymous function creation to be able to advise you on what may be happening. Can you please file this information as an issue? (It's nicely detailed already.) The only other thing I can suggest is that, if

Re: [julia-users] Re: Code starting to be slow after 30 min of execution

2015-05-01 Thread Tim Holy
I hadn't noticed he was calling eval. Good catch, Stefan. --Tim On Friday, May 01, 2015 10:57:40 AM Stefan Karpinski wrote: With the anonymous function approach, you shouldn't be calling eval at all. As a rule, if you're calling eval at all after the startup phase of your program, you're

Re: [julia-users] Re: Code starting to be slow after 30 min of execution

2015-05-01 Thread Stefan Karpinski
With the anonymous function approach, you shouldn't be calling eval at all. As a rule, if you're calling eval at all after the startup phase of your program, you're doing something wrong. On Fri, May 1, 2015 at 10:46 AM, 'Antoine Messager' via julia-users julia-users@googlegroups.com wrote: I

[julia-users] Re: Code starting to be slow after 30 min of execution

2015-05-01 Thread 'Antoine Messager' via julia-users
I am sorry for insisting, but it seems that even with anonymous function, the time necessary to create an anonymous function or a normal function (without the @gensym) is linearly increasing with the quantity of function created. I have tried the following: *for i in 1:1000* *

[julia-users] Re: Code starting to be slow after 30 min of execution

2015-04-28 Thread 'Antoine Messager' via julia-users
Both ideas you have given are working. Wonderful! I just need to figure out which one is the fastest, the @gensym out of the creation of the function probably. Thank you very much! Antoine. Le lundi 27 avril 2015 15:49:56 UTC+1, Antoine Messager a écrit : Dear all, I need to create a lot

Re: [julia-users] Re: Code starting to be slow after 30 min of execution

2015-04-28 Thread Stefan Karpinski
NLsolve seems to work fine with anonymous functions: julia using NLsolve julia f! = function (x, fvec) fvec[1] = (x[1]+3)*(x[2]^3-7)+18 fvec[2] = sin(x[2]*exp(x[1])-1) end (anonymous function) julia g! = function (x, fjac) fjac[1, 1] = x[2]^3-7