[Gllug] Faster maths?

Adrian McMenamin adrian at newgolddream.dyndns.info
Fri Mar 9 11:55:28 UTC 2007


On Fri, March 9, 2007 10:27 am, John Hearns wrote:
> Adrian McMenamin wrote:
>> I have some perl which indexes and dithers a PNG image to a 256 colour
>> palette.
>>
> A reply which might not be any use.
> Which processor and compiler are you using?
> Are you sure the compiler is making efficient use of parallelism in your
> processor?
>
> I guess though as you are using Perl you can't chop and change the maths
> library.
>
>

I amjust suing the standard Debian amd64 tools, whatever they may be.

I think it might actually be the slowness of perl hashes that is the issue
here - I tested out the dithering on a 16 colour palette - which would
mean making an order of magnitude less calculations than the 256 palette
(as the number of distances needing to be comapared would fall) - but it
took around 10 hours to complete - and I can only assume that is because
it pushed the matches into the lookup hash.

Having said that, I am only now running this test with the 256 colour
palette and this image, so maybe that will take even longer!

Is hashing in perl really that slow?

-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list