I implemented merge sort in flash, and then compare it to others.
Action: sorting 5000 random numbers in an array
Merge sort - 3.4 seconds
Flash's built-in sort - 0.15 second
Bubble sort - 38.5 seconds (yeah, don't use bubble sort! It's way too slow!)
Merge sort is one of the fastest (others are quicksort, heap sort, ...etc) sorting algorithms (speed = n log n), and yet, compared to the built-in sorting method, it is 20 times slower.
Also, Flash is bad at math.
It takes about a minute to render an image of the Mandelbrot set in Flash.
I use almost the same method, but coded in Paint.NET's codelab, it produces an image 100 times the size, 10000 times more detail, lots of coloring calculation, and with half the time.
Recently, working on a flash 3D engine project, Flash slows down just by doing a few (maybe 20~30) trigonometry calculations (sin/cos only).
It's a real frustration.
*hopes to upgrade to Flash CS3 soon*
Tuesday, December 11, 2007
Subscribe to:
Post Comments (Atom)
mmmhhhummmmmm yaaaaa java script and html make sense to me but ya that was confusing! lol
ReplyDeletei have flash 8 too, mine instead of becoming slow its not responding. it happened to me while i was in the middle of creating a flash game
ReplyDelete^That's not good^
ReplyDelete