I’m trying to use 2htdp/image to generate images of fractals.  

But while generating the images is “relatively” quick, it is freezing the 
images that’s taking a long time.
For the most complicated one, I started it running two nights ago, and the 
freeze operation on it still hasn’t finished.
For the next worst one, it takes about 21 times longer to freeze it than it 
takes to generate it.

Why is it taking so long to freeze these images, and is there anything I can do 
about it, like create the images in a certain way or give hints?

The code that generates these fractals is here:
https://github.com/AlexKnauth/koch-snowflake
(and it is racket code, in case you’re wondering)

For relatively small/simple fractals, freezing it takes anywhere from 1.5 to 
3.9 times longer than creating it.
For this one, freezing it takes a bit more than 3.5 times longer than creating 
it.
time(img-expr)    : cpu time: 186 real time: 185 gc time: 26
time(freeze(img)) : cpu time: 668 real time: 667 gc time: 31
For this, about 3.9 times longer:
time(img-expr)    : cpu time: 141 real time: 141 gc time: 22
time(freeze(img)) : cpu time: 549 real time: 549 gc time: 20

For a more complex fractal, about 21 times longer:
time(img-expr)    : cpu time: 18722 real time: 18807 gc time: 4304
time(freeze(img)) : cpu time: 400357 real time: 405312 gc time: 214723
And for this, about 18 times longer:
time(img-expr)    : cpu time: 8425 real time: 8547 gc time: 1203
time(freeze(img)) : cpu time: 152594 real time: 153001 gc time: 64968
And for this, about 17.8 times longer:
time(img-expr)    : cpu time: 27232 real time: 27264 gc time: 4254
time(freeze(img)) : cpu time: 485319 real time: 504408 gc time: 210964

For the worst one:
time(img-expr)    : cpu time: 2177463 real time: 2455108 gc time: 1189933
time(freeze(img)) : hasn’t finished yet
For this one, I started it two nights ago, and it’s still running.


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to