Time consuming problem

71 views
Skip to first unread message

Bohan Zhang

unread,
Aug 26, 2016, 1:37:52 PM8/26/16
to julia-users
Hi there,

I am just a beginner in Julia and I tried my code which contains a nested loop with LP optimization in it. And I find it getting slower and slower, at first, it takes likes 5 secs per loop, after a day, it takes about 10 mins. It's pretty weird to me.

Chris Rackauckas

unread,
Aug 26, 2016, 2:46:23 PM8/26/16
to julia-users
Hi, welcome to Julia. It would be easier to help you if you shared some code. Could you share a small example which highlights the problems you're having?

Also, have you checked out the Performance Tips? One major thing new users run into is the global variable issue. Note that if you are working directly in the REPL, that is the global scope and Julia cannot optimize very well there. Instead, if you wrap your work in a function you'll see that it does much better (time it twice since the first time will include compile time).
Reply all
Reply to author
Forward
0 new messages