From kde-kimageshop Fri Dec 31 15:42:42 2010 From: Geoffry Song Date: Fri, 31 Dec 2010 15:42:42 +0000 To: kde-kimageshop Subject: Re: [patch] on the performance of KisCircleMaskGenerator::valueAt Message-Id: X-MARC-Message: https://marc.info/?l=kde-kimageshop&m=129381020729047 On Thu, Dec 23, 2010 at 10:00 PM, Geoffry Song wrote: > I noticed that KisCircleMaskGenerator::valueAt(), which can easily be > called millions of times in a single stroke, has some rather > inefficient code (in particular, an unnecessary sqrt()), so I took the > liberty of optimizing the code a bit. This patch should somewhat > improve the performance of large brushes, especially the sketch brush > with a large diameter. No, it is not a large difference. Here's a version that's less verbose: http://fpaste.org/8v0b/ (it removes the *Squared variables that were from an earlier version) -- Segmentation fault _______________________________________________ kimageshop mailing list kimageshop@kde.org https://mail.kde.org/mailman/listinfo/kimageshop