Drake7707 Posted August 16, 2006 Report Posted August 16, 2006 normally i don't post about stuff that i have optimized, i only mention it in the changes list of the new version, but i think this is worth mentioning. The algorithm that i have now is a whooping 85% faster than it first was, on line width = 20.I must say that's pretty impressive And i think the new algorithm is even faster for bigger width, as i was able to decrease the complexity of the old one ( O(n²) ) to O(n) in the new one ( O(n*n/2) to O(n*4) to be exact )
»SOS Posted August 17, 2006 Report Posted August 17, 2006 Optimizing things that are just about never used? Erm... I appreciate the effort but maybe there are greater causes to follow
Drake7707 Posted August 17, 2006 Author Report Posted August 17, 2006 the line algorithm is more used than you think. Like just pencil with width > 1 is already calling the line algorithm
Samapico Posted August 17, 2006 Report Posted August 17, 2006 line, sticky line, pencil, eraser, replace brush, rectangle, ellipse.... almost all tools use it
»SOS Posted August 17, 2006 Report Posted August 17, 2006 Yes, and almost all tools draw their stuff in under 50ms. A quite meaningless optimization, I think.
Drake7707 Posted August 17, 2006 Author Report Posted August 17, 2006 tools draw that fast with line width < 4 which is the max thickness now. Buuuuuuuuuuuut if i make tool toolbars for them, and you can put size to 128 or so, it HAS to be fast.
Samapico Posted August 18, 2006 Report Posted August 18, 2006 i dont know if you tried drawing a loooong 4-tiles-large line while zoomed out, using walltiles... it kinda lags
Recommended Posts