Hi Kevin, thanks for suggestions. I did try wrapping the main code in a 
function, but it made no appreciable difference. I've read through the 
Performance Tips a couple of times now, but I'll review it again.

On Tuesday, January 6, 2015 11:15:36 AM UTC-6, Kevin Squire wrote:
>
> Hi Craig,
>
> If you haven't yet, you should read through the Performance Tips section 
> of the manual. 
>
> One easy thing you should try is to wrap the main code in a function. 
> While this will hopefully change before v1.0, Julia has a hard time 
> optimizing code in global scope. 
>
> Cheers,
>    Kevin
>
> On Tuesday, January 6, 2015, Craig Bosma <[email protected] <javascript:>> 
> wrote:
>
>> Hi,
>>
>> I've been playing with Julia lately by creating a little toy mandelbrot 
>> set computation, and trying to optimize it for comparison with a C++ 
>> version. I've also been trying to parallelize it to learn more about 
>> Julia's parallel computing model and to compare with parallel 
>> implementations in C++. My latest implementation can be found in this 
>> gist. <https://gist.github.com/bosmacs/eb329dc8360dbf1282b1>
>>
>> On my machine, this runs in about 50 seconds, with (23622108264 bytes 
>> allocated, 20.50% gc time) when executed serially. Those allocations seem 
>> excessive to me, but I'm not sure what to do about it. With 8 workers on 4 
>> cores, I can cut that down to about 20 seconds. On the same machine, my C++ 
>> serial/parallel implementations run in ~8s/2s. I expected the difference to 
>> be a less than a full order of magnitude, so I guess I'm wondering if there 
>> are any obvious performance problems with my implementation. If anyone has 
>> any suggestions of how to improve my code, I'd sure like to hear about it. 
>>
>> Thanks,
>> Craig
>>
>

Reply via email to