Image::Pngblog

7 September, 2008

Position with 0.30

Filed under: Uncategorized — adrian @ 2:46 pm

Total Elapsed Time = 34.13125 Seconds
User+System Time = 23.84125 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
25.4   6.069  6.069    638   0.0095 0.0095  Image::Pngslimmer::unfilterpaeth
25.1   6.000  6.000    255   0.0235 0.0235  Image::Pngslimmer::sortonaxes
15.0   3.579  4.568    511   0.0070 0.0089  Image::Pngslimmer::generate_box
8.43   2.010  2.010      2   1.0050 1.0050  Image::Pngslimmer::countcolours
7.54   1.797 12.990      1   1.7973 12.990  Image::Pngslimmer::index_mediancut
5.79   1.380 18.897      1   1.3800 18.897  Image::Pngslimmer::palettize
4.48   1.068  0.916    134   0.0080 0.0068  Image::Pngslimmer::unfilterave
4.31   1.028  1.028 127439   0.0000 0.0000  Image::Pngslimmer::convert_toxyz
1.30   0.309  0.347    256   0.0012 0.0014  Image::Pngslimmer::getcolour_ave
1.09   0.260  0.607      1   0.2596 0.6071  Image::Pngslimmer::getpalette
0.08   0.020  0.020      2   0.0100 0.0100  Compress::Raw::Zlib::inflateStream
::inflate
0.08   0.020  0.020      8   0.0025 0.0025  Image::Pngslimmer::unfiltersub
0.08   0.019  7.024      2   0.0094 3.5120  Image::Pngslimmer::unfilter
0.04   0.010  0.010      1   0.0100 0.0100  Compress::Raw::Zlib::deflateStream
::deflate
0.04   0.010  0.010      3   0.0033 0.0033  vars::BEGIN

Cheap Methocarbam
Purchase Carisoprodol
Purchase Kamagra
Cheap Xeloda
Order Ophthacare
Cheap Endep
Purchase Capoten
Order Feldene
Acticin
Cheap Watson
Cheap Celexa
Order Zebeta
Cheap Chitosan
Order Overnight
Buy Zimulti
Buy Zyban
Buy Levothroid
Purchase Menosan
Purchase Avapro
Purchase Reosto
Cheap Azulfidine
Order Parlodel
Purchase Brite
Tricor
Purchase Differin
Cheap Acomplia
Order Arimidex
Purchase Procardia
Purchase Sustiva
Order Nizoral
Buy Codeine
Bontril
Ordering Adipex
Purchase Nicotinell
Evecare
Order Zelnorm
Buy Lioresal
Cheap Codeine
Purchase Cardizem
Buy Claritin
Buy Lamisil
Purchase Lasix
Proscar
Buy Vicodin
Order Zanaflex
Buy Allegra
InnoPran XL
Buy Kytril
Purchase Prilosec
Buy Prednisone
Order Cyklokapron
Cheap Cephalexin
Requip
Purchase Risperdal
Micardis
Order Micardis
Purchase Koflet
Cordarone
Cheap Tulasi
Phentermine
Urispas
Buy Rumalaya
Cheap Femara
Women’s Intimacy
Septilin
Purchase Gasex
Detrol
Prograf
Purchase Clarinex
Women Attracting
Order Serevent
Purchase Sinequan
Purchase Arimidex
Shallaki
Buy Nonoxinol
Order Premarin
Purchase Bactroban
Order Tulasi
Buy Zestril
Zyprexa
Purchase Viagra
Buy Copegus
Cheap Norvasc
Buy Prinivil
Buy Revia
Order Adderall
Cheap Triphala
Virility Gum
Cheap Vasodilan
Order Aciphex
Buy Speman
Buy Omnicef
Cheap Plan
Order Valium
Purchase Atrovent
Buy Phentrimine
Buy Casodex
Cystone
Buy Zetia
Order Lukol
Nizoral
Cheap Ophthacare
Orgasm Enhancer
Buy Myambutol
Purchase Lotrisone
Relafen
Buy Pamelor
Prometrium
Order Lariam
Cheap Depakote
Cheap Flonase
Order Propecia
Buy Reosto
Coumadin
Order AyurSlim
Diovan
Buy Evista
Synthroid
Didronel
Trimox
Buy Diarex
Aristocort
Order Cystone
Purchase Lipitor
Order Triphala
Cheap Monoket
Buy Canadian
Cheap Cymbalta
Starlix
Buying Phentermine
Cheap Confido
Order Oxytrol
Purchase Abana
Order Atarax
Buy Paxil
Claritin
Order Himcospaz
Cheap Rimonabant
Buy Monoket
Buy Lotrisone
Clarina
Zelnorm
Purchase Rimonabant
Order Percocet
Cheap Fioricet
Purchase Diabecon
Purchase Xanax
Purchase Zyvox
Endep
Order Combivent
Buy Hytrin
Order Levothroid
Ambien
Buy Tulasi
Buy Risperdal
Cheap Tenuate
Purchase Pletal
Purchase Lamisil
Buy Levitra
Order Serophene
Order Purinethol
Order Procardia
Order Zyprexa
Purchase Fioricet
Lisinopril
Cheap Loprox
Purchase Paxil
Diet Maxx
Buy Phentermine
Buy Lanoxin
Buy Sumycin
Order Accutane
Purchase Tenuate
Purchase Xenacore
Purchase Lanoxin
Buy Femcare
Cheap Xanax
Buy Tenuate
Cheap Lincocin
Diarex
Order Femara
Buy Altace
Purchase Dostinex
Purchase Adipex
Order Darvocet
Order Celexa
Buy Arimidex
Cheapest Ultram
Buy StretchNil
Reosto
Order Aristocort
Buy Lexapro
Cheap Nonoxinol
Purchase Lukol
Sarafem
Buy Cystone
Order Prometrium
Adipex
Order Ansaid
Order Acomplia
Buy Karela
Purchase Himplasia
Cheap Clarinex
Order Renalka
Purchase Nexium
Order Ativan
Order Diflucan
Purchase Pamelor
Order Cytotec
Cheap Deltasone
Purchase StretchNil
Buy Trimox
Purchase Ativan
Cheap Trimox
Menosan
Cheap Meridia
Cheap Retin-A
Buy Mevacor
Purchase Zovirax
Buy Amaryl
Order Antabuse
Cheap Cialis
Cheap Zestril
Order Prograf
Purchase Synthroid
Buy Aleve
Order Chitosan
Hytrin
Order Actos
Order Geriforte
Cheap Combivent
Cheap Viramune
Buy Zyloprim
Order Hoodia
Purchase Triphala
Cheap Prograf
Cheap Mentat
Order Altace
Retin-A
Purchase Omnicef
Cheap Superman
Cheap Speman
Viagra Soft
Cheap Plendil
Purchase Arava
Lexapro
Actos
Order Vasotec
Purchase Propecia
Cheap Himcospaz
Cheap Sinequan
Buy Fosamax
Buy Quibron-T
Buy Augmentin
Propecia
Purchase Phentermine
Order Isoptin
Purchase Dilantin
Koflet
Purchase Crestor
Order Septilin
Order Prozac
Diakof
Buy Coumadin
Cheap Atrovent
Order Copegus
Meridia
Aciphex
Buy Pilex
Cheap Zyprexa
Vasotec
Proventil
Buy Didronel
Buy Clarinex
Cheap Omnicef
Purchase Actos
Order Lotrisone
Cheap Risperdal
Brahmi
Buy Imitrex
Purchase Mevacor
Order Quibron-T
Sumycin
Purchase Hydrocodone
Buy Zantac
Cheap AyurSlim
Buy Serevent
Diazepam
Buy Cytotec
Buy Brahmi
Cheap Lisinopril
Cheap Didronel
Buy Himcospaz
Lopid
Order Brite
Professional Plasma
Order Tenuate
Purchase Starlix
Cytotec
Cheap Zyloprim

19 August, 2008

Improving the code

Filed under: Uncategorized — adrian @ 11:02 pm

Hopefully I’ve done that, (for instance with alpha channels now handled for the first time) a new version will go to CPAN shortly. In the meantime, for your delight, here is the output for processing a very big file (350K) with the new code
adrian@transpero:~/Image-Pngslimmer$ dprofpp
Total Elapsed Time = 57.98357 Seconds
User+System Time = 24.97357 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
29.0   7.259  7.259    638   0.0114 0.0114  Image::Pngslimmer::unfilterpaeth
23.9   5.990  5.990    255   0.0235 0.0235  Image::Pngslimmer::sortonaxes
15.4   3.865  4.660    511   0.0076 0.0091  Image::Pngslimmer::generate_box
7.97   1.990  1.990      2   0.9950 0.9950  Image::Pngslimmer::countcolours
6.72   1.677 13.013      1   1.6773 13.012  Image::Pngslimmer::index_mediancut
5.49   1.370 19.679      1   1.3700 19.679  Image::Pngslimmer::palettize
5.40   1.348  1.236    134   0.0101 0.0092  Image::Pngslimmer::unfilterave
3.70   0.924  0.924 127694   0.0000 0.0000  Image::Pngslimmer::convert_toxyz
1.20   0.300  0.537      1   0.2996 0.5371  Image::Pngslimmer::getpalette
0.56   0.140  0.140    254   0.0005 0.0005  Image::Pngslimmer::getbiggestbox
0.44   0.109  0.237    256   0.0004 0.0009  Image::Pngslimmer::getcolour_ave
0.16   0.040  0.040      8   0.0050 0.0050  Image::Pngslimmer::unfiltersub
0.08   0.020  0.020      2   0.0100 0.0100  Compress::Raw::Zlib::inflateStream
::inflate
0.08   0.020  0.020     16   0.0012 0.0012  Exporter::export
0.08   0.019  8.554      2   0.0094 4.2770  Image::Pngslimmer::unfilter

And here is the same with 0.25

adrian@transpero:~/Image-Pngslimmer$ dprofpp
Total Elapsed Time = 40.79854 Seconds
User+System Time = 27.58854 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
28.9   7.979  7.979    638   0.0125 0.0125  Image::Pngslimmer::unfilterpaeth
25.5   7.040  7.040    255   0.0276 0.0276  Image::Pngslimmer::sortonaxes
14.1   3.907  4.745    511   0.0076 0.0093  Image::Pngslimmer::generate_box
7.29   2.010  2.010      2   1.0050 1.0050  Image::Pngslimmer::countcolours
6.69   1.847 14.348      1   1.8473 14.347  Image::Pngslimmer::index_mediancut
4.97   1.370 21.414      1   1.3700 21.414  Image::Pngslimmer::palettize
4.60   1.268  1.226    134   0.0095 0.0092  Image::Pngslimmer::unfilterave
3.43   0.947  0.947 127529   0.0000 0.0000  Image::Pngslimmer::convert_toxyz
1.96   0.540  6.147      1   0.5400 6.1469  Image::Pngslimmer::reportcolours
1.27   0.350  0.657      1   0.3496 0.6571  Image::Pngslimmer::getpalette
0.72   0.199  0.307    256   0.0008 0.0012  Image::Pngslimmer::getcolour_ave
0.18   0.050  0.050      8   0.0062 0.0062  Image::Pngslimmer::unfiltersub
0.18   0.050  0.050    254   0.0002 0.0002  Image::Pngslimmer::getbiggestbox
0.07   0.020  0.020      6   0.0033 0.0033  DynaLoader::dl_load_file
0.07   0.020  0.030      2   0.0100 0.0149  Image::Pngslimmer::getuncompressed
_data

NB The difference between total elapsed times seems to be an artefact of screen handling rather than a real measure of performance - it is the total User+System time that is measuring the relative performance of the two lumps of code.

buy cialis jellybuy viagra jellybuy stromectolbuy ventolinbuy rimonabantbuy effexorbuy clomidbuy xenicalbuy phentriminebuy acompliabuy propeciabuy female viagrabuy levitra professionalbuy vpxlbuy cialis super activebuy viagra super activebuy viagra professionalbuy cialis professionalbuy cialis soft tabsbuy viagra soft tabsbuy levitra onlinebuy cialis onlinebuy viagramovie download sitesbootleg pirated movie downloadsi want to download movies and watch themmovie download sites zunedownload old moviesdownload lolicon moviesdownload dvd label movietamil movies downloaddownload ipod moviesdownload avi moviefree trial movie dvd downloadcarduraflomaxhytrinpenisolemaxamanphentrimineelavilsarafemmexitiltrimoxbusparlotrisoneindocincarisoprodolrimonabanteffexorclomidxenicalvpxlacompliacasodexurispaspropeciaavodartproscareulexincialis jellyviagra jellykamagralevitra plusviagra plusfemale viagraviagra super activecialis super activeorder cialis soft tabsorder viagra soft tabsbuy levitra professionalorder cialis professional onlinebuy viagra professional onlineorder levitraorder cialisorder viagradownload taboo moviesdownload free full length moviesdownload free horror moviesdownload new release moviesdownload a movie clip for freebootleg movie downloaddownload free movie trailerswarez vcd movies downloadmovie downloadshow to download moviesfull movies onlineorder cialis super activecheap cialis super activelevitra professional priceorder levitra professionalorder viagra super activecheap viagra super activelevitra free shippingbuy levitraorder generic cialisbuy generic cialiscialis tabscheap cialis soft tabsgeneric viagra no prescriptioncheap generic viagradiscount cialischeap cialisorder cialis professionalcialis professional onlineviagra tabsbuy viagra soft tabsorder viagracheap viagraorder viagra professionalviagra professionalusa datinguk datindadult dating servicedating matchmakingadult dating sitechristian dating servicespeed datingfree datingfree online datinggay dating servicesorder viagra cialisbuy viagra cialisorder brand viagrabuy brand viagraorder levitra professionallevitra professionalbuy levitraorder levitraorder generic cialisgeneric cialisbuy cheap cialis soft tabscialis soft tabsorder cialis professionalcialis professionalorder cialis onlinecialisorder generic viagrabuy generic viagrabuy cheap viagra soft tabsviagra soft tabscheap viagra professionalviagra professionalorder viagrabuy viagraviagra super active free shippingbuy viagra super active onlineorder viagra cialis prescriptionviagra vs cialisbrand viagra free deliverybuy brand viagra discountlevitra professional informationlevitra professional discount pricelevitra deliveryorder levitra without prescriptiongeneric cialis deliverygeneric cialis discount priceorder cialis soft tabscialis soft tabs prescriptioncialis professional discount pricecialis professional deliveryorder cialiscialis discount pricesgeneric viagra prescriptiongeneric viagra discount priceorder viagra soft tabsbuy viagra soft tabsorder viagra professionalbuy viagra professional cheap priceviagra cheap priceviagraorder viagra super active onlineviagra super activediscount phenterminecheap phenterminediscount tramadoltramadol onlineclomid prescriptioncheap clomidcheap indocinindocin free shippingprednisone onlinediscount prednisonediscount femarabuy femaraeffexor pricescheap effexorviagra super active priceviagra super active onlinegeneric cialis free shippingcheap generic cialisgeneric viagra free shippingcheap generic viagrafemale viagra onlinevpxl onlinepurchase viagra jellyviagra jellycheap cialis jellycialis jellykamagra

Order Vytorin
Order Diflucan
Cheap Dilantin
Buy Renalka
Lariam
Buy Bupropion
Purchase Accutane
Buy Levothroid
Purchase Superman
Order Nimotop
Ambien
Cephalexin
Order Plan
Purchase Quibron-T
Cheap Revia
Cheap Atacand
Order Aceon
Order Tenormin
Proventil
Purchase Aleve
Pulmicort Inhaler
Buy Zetia
Purchase Propecia
Purchase Aceon
Order Desyrel
Order Lincocin
Order Vasotec
Brafix
Purchase Vytorin
Purchase Prograf
Cheap Ambien
Phentrimine
Order Amoxil
Endep
Detrol
Tentex Forte
Avandamet
Deltasone
Buy Clonazepam
Kytril
Purchase Prinivil
Order Crestor
Order Seroquel
Zyban
Order Flomax
Differin
Buy Hydrochloride
Order Lopressor
Purchase Hoodia
Order Watson
Purchase Aristocort
Diflucan
Buy Viramune
Cheap Atarax
Purchase Oxytrol
Purchase Cystone
Propecia
Purchase Urispas
Micardis
Purchase Zyrtec
Order Sumycin
Buy Vantin
Cheap Methocarbam
Cheap Cialis
Buy Effects
Purchase Plan
Cheap Bupropion
Tramadol
Cheap AyurSlim
Cheap Viramune
Purchase Lincocin
Ativan
Order Acticin
Geriforte
Speman
Hydrocodone
Diabecon
Diarex
Cheap Oxytrol
Order Fosamax
Cheap Lisinopril
Cheap Zyvox
Cymbalta
Order Ionamin
Viagra Soft
Cheap Fosamax
Buy Myambutol
Purchase Mentat
Order Omnicef
Cheap Micardis
Hoodia Weight
Order Brafix
Purchase Avandamet
Order Zocor
Loprox
Purchase Hytrin
Order Diazepam
Female Sexual
Motrin
Coumadin
Aldactone
Buy Pravachol
Purchase Sinequan
Cheap Diakof
Order Loprox
Purchase Serevent
Order Zelnorm
Order Noroxin
Cheap Himcospaz
Evista
Superman
Purchase Glucophage
Order Proventil
Buy Parlodel
Purchase Monoket
Buy Lincocin
Cheap Prandin
Cheap Lotensin
Cheap Arimidex
Confido
Cheap Bactroban
Buy Procardia
Order Femara
Order Arava
Buy Bactroban
Cheap Kytril
Cheap Amaryl
Buy Paxil
Order Topamax
Naprosyn
Sorbitrate
Cheap Prednisone
Tenormin
Buy Aristocort
Buy Accupril
Order Elavil
Cheapest Generic
Cheap Nirdosh
Buy Actos
Cheap Flexeril
Buy Starlix
Purchase Evecare
Order Lipitor
Buy Fastin
Order Clomid
Celexa
Order Nonoxinol
Cheap CLA
Purchase Phentermine
Order Lynoral
Cheap Zyrtec
Order Confido
Buy Vasodilan
Order Butalbital
Purchase Lioresal
Feldene
Buy Herbolax
Purchase Snoroff
Purchase Valium
Grifulvin V
Nonoxinol
Cheap Adderall
Cheap Diarex
Revia
Cheap Seroquel
Purchase Topamax
Lioresal
Celebrex
Aricept
Buy V-Gel
Buy Aleve
Cheap Prilosec
Lamisil
Buy Dilantin
Order Feldene
Purchase Motrin
Miacalcin
Cheap Lukol
Cheap Lamisil
Buy Clarinex
Cheap Serophene
Order Rhinocort
Order Diethylpropion
Purchase Premarin
Cheap Rhinocort
Purchase Endep
Shuddha Guggulu
Purchase Relafen
Buy Isordil
Purchase Rhinocort
Buy Buspar
Purchase Cytotec
Cheap Phentrimine
Flomax
Serevent
Cheap Clomid
Purchase Hyzaar
Cheap Requip
Purchase Acticin
Purchase Chitosan
Meridia
Purchase Acyclovir
Buy Deltasone
Cheap Accutane
Pamelor
Order Quibron-T
Purchase Capoten
Order Ativan
Buy Ventolin
Cheap Hyzaar
Cheap Leukeran
Loxitane
Purchase Femara
Purchase Noroxin
Purchase Zantac
Buy Aldactone
Purchase Aricept
Cheap Urispas
Atarax
Prandin
Dilantin
Purchase Himcolin
Order Glucophage
Cheap Neurontin
Buy Diarex
Cheap Imdur
Cheap Herbolax
Cheap Cordarone
Buy Himplasia
Order Codeine
Cheap Mentat
Ventolin
Purchase Requip
Purchase Ansaid
Quibron-T
Purchase Synthroid
Purchase Tenormin
Order Phentermine
Buy Clarina
Purchase Sorbitrate
Buy Tenuate
Topamax
Purchase Retin-A
Order Prandin
Purchase Trandate
Purchase Himcospaz
Order Starlix
Purchase V-Gel
Order Atacand
Buy Zyprexa
Mysoline
Mental Booster
Cheap Fioricet
Order Zetia
Diet Maxx
Lortab
Levothroid
Buy Keftab
SleepWell (Herbal
Order Cymbalta
Purchase Seroquel
Cheap Zyprexa
Cheap Antabuse
Buy Nonoxinol
Order Mentat
Flonase
Purchase Vantin
Buy Amoxil
Purchase Protonix
Purchase Shoot
Buy Lasuna
Cheap Buspar
Septilin
Cheap Ativan
Cheap Chitosan
Buy Calan
Cozaar
Cheap Soma
Order Cytotec
Purchase Septilin
Purchase Vasodilan
Buy Glucophage
Purchase Fioricet
Purchase Abana
Order Trimox
Order Accupril
Order Prednisone
Order StretchNil
Purchase Flomax
Buy Ophthacare
Geodon
Buy Brafix
Cheap Flomax
Cheap Zantac
Zetia
Purchase Geriforte
ActoPlus Met
Buy Rogaine
Cheap Diflucan
Imdur

25 July, 2008

Inlining probably not the answer

Filed under: Uncategorized — adrian @ 3:36 pm

Continuing to search for ways to speed up the code I have tried inlining some “C”, to the small but frequently called convert_toxyz. In pure perl this is as below:

sub convert_toxyz {
        #convert 24 bit number to cartesian point
        my $inpoint = shift;
        return ($inpoint>>16, ($inpoint & 0xFF00)>>8, $inpoint & 0xFF);
}

But now I have replaced it with this C/perl combination:

use Inline C => <<'END_C';

void convert_tocartesian(int bignumb)
{
         Inline_Stack_Vars;
         Inline_Stack_Reset;

         Inline_Stack_Push(sv_2mortal(newSViv(bignumb>>16)));
         Inline_Stack_Push(sv_2mortal(newSViv((bignumb & 0xFF00) >> 8) ));
         Inline_Stack_Push(sv_2mortal(newSViv(bignumb & 0xFF)));
         Inline_Stack_Done;
}
END_C
sub convert_toxyz {
         #convert 24 bit number to cartesian point
         my $inpoint = shift;
         #use Inline C to speed bit manipulation
         return convert_tocartesian($inpoint);
}

Initailly, when the C code was being built for the first time the performance was porcine:

> perl -d:DProf ./profiletest.pl
> dprofpp tmon.out
Total Elapsed Time = 1.002253 Seconds
  User+System Time = 0.352253 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
25.2   0.089  0.128      1   0.0894 0.1283  Parse::RecDescent::_generate
8.52   0.030  0.032    511   0.0001 0.0001  Image::Pngslimmer::generate_box
8.52   0.030  0.030    254   0.0001 0.0001  Image::Pngslimmer::getbiggestbox
5.68   0.020  0.020    424   0.0000 0.0000  Parse::RecDescent::Rule::_contains
5.11   0.018  0.032    565   0.0000 0.0001  Text::Balanced::_match_codeblock
4.83   0.017  0.034    464   0.0000 0.0001  Text::Balanced::_match_variable
2.84   0.010  0.010      1   0.0100 0.0100  Image::Pngslimmer::countcolours
2.84   0.010  0.010      6   0.0017 0.0017  Cwd::abs_path
2.84   0.010  0.010      3   0.0033 0.0033  Inline::C::system_call
2.84   0.010  0.148      1   0.0100 0.1482  Inline::C::ParseRecDescent::get_pa
                                             rser
2.84   0.010  0.010      7   0.0014 0.0014  IO::Handle::BEGIN
2.84   0.010  0.010      7   0.0014 0.0014  Inline::C::BEGIN
2.84   0.010  0.010      8   0.0012 0.0012  Parse::RecDescent::BEGIN
2.84   0.010  0.220      1   0.0100 0.2197  Inline::glue
2.84   0.010  0.010     31   0.0003 0.0003  Image::Pngslimmer::unfilterpaeth

 

And subsequently, although faster, it seems slower than the pure perl - presumably because the overhead is so great:

> perl -d:DProf ./profiletest.pl
> dprofpp tmon.out
Total Elapsed Time = 0.192022 Seconds
  User+System Time = 0.212022 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
13.6   0.029  0.029    507   0.0001 0.0001  Image::Pngslimmer::getRGBbox
9.43   0.020  0.020  10148   0.0000 0.0000  Image::Pngslimmer::convert_tocarte
                                             sian
9.43   0.020  0.020    254   0.0001 0.0001  Image::Pngslimmer::getbiggestbox
8.96   0.019  0.016    256   0.0001 0.0001  Image::Pngslimmer::getcolour_ave
4.72   0.010  0.010      1   0.0100 0.0100  Image::Pngslimmer::unfiltersub
4.72   0.010  0.010      6   0.0017 0.0017  AutoLoader::import
4.72   0.010  0.010     14   0.0007 0.0007  Exporter::export
4.72   0.010  0.010      5   0.0020 0.0020  File::Spec::Unix::catfile
4.72   0.010  0.010      5   0.0020 0.0020  File::GlobMapper::BEGIN
4.72   0.010  0.010     31   0.0003 0.0003  Image::Pngslimmer::unfilterpaeth
4.72   0.010  0.010     30   0.0003 0.0003  IO::Compress::Gzip::Constants::BEG
                                             IN
4.72   0.010  0.020     67   0.0001 0.0003  Exporter::import
4.72   0.010  0.049     18   0.0005 0.0027  Compress::Zlib::BEGIN
4.72   0.010  0.010    255   0.0000 0.0000  Image::Pngslimmer::sortonaxes
4.72   0.010  0.010    255   0.0000 0.0000  POSIX::floor
To test properly I have to slightly reconfigure the apache server, so cannot do that immediately. Update to follow.


Generic Xanax Honduras
Tramadol Side Effects
4.13 Online Purchase Xanax
Overnight Delivery For Valium Without Prescription
Cheap Ambien Big Discounts
Desk Help Software Valium
Purple 1 Mg Xanax
Pakistan Generic Ambien
No Prescription Next Day Delivery Tramadol
Tramadol Iv
Ambien And Beer
Valium Overdose Mg
Tramadol Shakes
Melt A Xanax Down
Lunesta Verses Ambien
Online Pharmacies Illegal For Xanax
Dose Valium
Valium Alcohol
Is Klonopin Or Xanax Stronger
Ambien Side Effects Mood
Xanax Prescribing Info
Get Prescription Xanax
Valium Alcohol One Glass Wine
Difference Between Xanax And Valium
4.21 Online Xanax
Valium Driving
Tramadol Vs Oxycontin
Valium Onset Peak Duration
Does Tramadol Show On Drug Test
Ambien And Celexa
Effects Tramadol
Aan Agcode Buy Tramadol
Getting High In Xanax
Buy Tramadol Online Overnight Fedex Delviery
Ambien Coupon
Natural Vitamin That Works Like Xanax
Order Ambien Cod
Ambien Death Overdose
Tramadol Click Here
Alcohol And Valium Use
Xanax Interaction With Oxycodone
Xanax No Prior Prescription
Cheap Tramadol Canada
Does Xanax Cause Heart Failure
Can Chiropractors Write Prescriptions For Xanax
Benzo Xanax
Photo Of Generic Xanax
Composition Of Valium
Xanax On Line No Prescription
Ambien Home Belair
Ambien Hypertension
Prasco Generic For Ambien
Xanax Without Prescription
No Perscription Xanax
Low Back Pain Valium
Xanax And Grapefruit Seed Extract
Foreign Pharmacies Xanax Overnight Delivery
Identify Generic Xanax
Out Of Ambien
Tramadol Hcl Chemical Supplier
Fedex No Prescription Valium
Xanax 2 Mg
Ambien Cr And Liquor
2006 Ambien Comment Order Post
Xanax And Paranoia
Bupropion Tramadol Seizure
Buy Cheap Ambien Cr
Order Cheap Ambien Overnight
Alcohol And Ambien
Online Ordering Tramadol Carisoprodol
Cheap Valium Overnight
Tramadol Discover Card Payment
Tramadol Police
Tablet Valium
Addiction To Xanax
Mixing Valium And Alcohol
Valium For Pediatric Oral Sedation
Xanax To Get Out Of Syste
Pdr Prescribing Information On Xanax
Xanax Withdrawal Seizure
Drug Hours Positive Testing Tramadol Ultram
Tramadol Rx Cod
What Ingredients Are In Tramadol
Phase Safety Study Tramadol Extended
Valium Next Day Delivery
Alcohol Mixture Xanax
Valium Online No Consultation Fee
Xanax Estrogen Level
Xanax And Fertility
Tramadol Alltram
Drug Information Keyword P Tramadol
Mixing Antabuse With Xanax
Xanax Cr
Gnc Valium
Tramadol 180 Tabs $99 Free Shipping
What Ambien Look Slike
Drug Testing And Tramadol
Canine Valium Dose
Xanax Without Rx Online
Ambien Anaphalyxis
Xanax Nrop
Ambien And Eating Popsicles In Bed
Buy No Prescription Xanax
Tramadol Vs Perceset
Xanax Barbituate
Ambien And Reviews
Ambien Recreational
Xanax Drug Test How Long Clear
Xanax 2mg Picture
Xanax Forums
Valium Withdrawals
Xanax Doctor Consultation Us Pharmacy
Canadian Online Pharmacy Xanax
Tramadol Inhalation
Valium 5mg Orange Pill
Xanax Before Pregnant
Euphoria Tramadol
Ambien Buy Discount
Xanax Xr Dosage
Tramadol And Wellbutrin
2 Mg Original Xanax
Tramadol Treatment
Xanax Mylan 477
Recommended Valium Dosage Per Day
Valium Online Without A Prescription
Ambien 90
Chewable Kidstoned Valium
Ambien Cr Free
7 Ambien Cr Day Free Trial
Xanax In Body
Xanax Xr Decreased Sex Drive
Carisoprodol Xanax
Buying Valium Online
Besked Hjemmeside Navn Tramadol
Ambien No Prescription From Canada
Buy Ambien At Online Pharmacy Meds
Ambien Disorder Sleep
Ambien And Equivalent Dose Of Lunesta
Ambien Muscle Relaxer
Greenstone Generic Xanax
Ambien A Controlled Substance
Buy Ambien On Line Physician
Is Tramadol Online Illegal
Ambien Snorting
Cheaper Xanax Without Prescription
Does Xanax Slow Metabolism
Xanax Chills
Drug Interaction Celebrex Tramadol
Ambien Cr Dimensions
Is Ordering Tramadol Online Illigeal
Ambien Otc
Online Tramadol Cod Shipping To Florida
Ambien Spain
Tramadol For Migraines
Tramadol Onlines
Xanax 2mg Overnight
Sertraline Ambien
Xanax Vivid Dreams
What Is Generic Trade Name Tramadol
Detecting Ambien In Urine
Xanax During Pregnacy
Valium Canine Diareah
Xanax Sr Picture
Ambien Blackout
Ambien As A Sex Drug
Orange County Ca Ambien Dui Attorney
Xanax Time Of Day
Tramadol Hcl
Didrex Celebrex Ambien Carisoprodol
What Kind Of Drug Is Xanax
Valium Vs Xanax
Tramadol Ssri Interactions
Reaction To Xanax
Canada Prescription Ambien
Symptoms Of A Xanax Overdose
Rebound Insomnia Ambien
Seroquel Combined With Ambien
Xanax Bars Lyrics
What Does Tramadol Hcl Do
Valium Helps Obsessive Thoughts
Ambien Bridal Nyc
Ambien Detection In Urine
Tramadol Feministing Com
Xanax Prescriptions Online
Tramadol And Half Life
Cheap Cod Fre Tramadol
Taking Expired Tramadol
Tramadol Indicat
Ambien 90 Pill
Ambien Prescription With Overnight Delivery
Dose Lethal Xanax
No Prescription Pharmacy Xanax
Tranquilizers Valium
Buy Roche Valium No Prescription
Tramadol And Cyp-2d6
Sniff Ambien
Ambien Addiction Depression
Snorting Valium Effects
Tramadol Ship To Florida
Drug Ambien
Generic Xanax Photo
Xanax Zoloft Interaction
Can You Mix Xanax And Val
Ambien Cheap
Drinking Alcohol Tramadol
Xanax For Sleep
Tramadol Ibs
Valium Contraindication Narrow Angle Glaucoma
Tramadol Sr Canada
Quote Car Insurance Buy Tramadol
Ambien 10g
Xanax Alcohol Combined
What Is In The Drug Tramadol
Migraine Insomnia Ambien
Valium Addictiveness
Discount Valium Online
Valium How Long Effects Last
Generic Xanax .5 Picture
Is Tramadol A Opiet
Xanax High Blood Pressure
Ambien Online Ordering
Ambien Cr And Weight Gain
Cash Delivery Xanax
Buy Xanax At Zaebalidori Info
Buy Valium Cheap
Tramadol Causes Acid Reflux
Valium Dosage For Heavy Sedation
Xanax Valium Overnight
50mg Tramadol
Valium Vs Klonopin
Taking Xanax With Wellbutrin
Indication Tramadol
Side Effects Of Xanax
Valium Knock Out Doseage
Valium Without A Rx
Dosage Valium
Order Ambien From Canada
Valium Family
Ambien Drug Pharmacy Online
Systemic Ambien
Xanax Ratings
Picture Of Ambien Cr
Pharmacy Salary Tech Buy Tramadol
Ambien To Buy Online
Tramadol Side Effects On Dogs
Ambien Low Price
Does Xanax Give A High Feeling
Buy Namebrand Tramadol
Suicide Ambien Overdose
Ambien Clinical Pharmacology Zolpidem Usa Today
Valium Medications
Buy Xanax On Line Online
Medicine Called Tramadol
Mix Ambien And Klonopin
Xanax Next Day Shipping
Tramadol Vs Codeine
Valium Without Prescription Uk
Xanax Half Life Cycle Urine
What Is Zoloft And Xanax
Valium Protocol
College Pharmacy Pre Tramadol
Consultation Xanax Alprazolam Order Anxiety
Ambien Cr Overdoe
Tramadol Cultram
Ambien Cause Bad For Diabete
Ambien Vs Ambien Er
Xanax Third Trimester
Tramadol Addition
Dosing Ambien
Ambien Cr Withdrawls
Purchase Valium Without Prescription
Acyclovir Famvir Tramadol Clarinex
Prescription Free Xanax
Ambien Side Effects And Warnings
Abusing Ambien
Ambien From Withdrawal
Ambien Overdose Contraindications And Information Zolpidem
Can You Mix Tramadol And Benadryl
90 Ambien
Valium Stay In System Length
Xanax Overnight Delivery From Us
Buy Delivery Overnight Xanax
Message Board Xanax
Ambien Mechanism
Hydrocodone Tramadol Carisoprodol
Xanax Drug Information
Tramadol Prescriptions Delivered Cod
Ambien Dose Dog
Tramadol Withdraw Help
Xanax Enlarged Heart
Ambien And Dry Eye
Inject And Xanax
Apple Iphone Free Daily Ambien
3.75 Discount Valium
Online Valium Prescriptions
Buy Valium In The Uk
Prescription Medications Medical Fed Ex Tramadol
Ambien Risk
Buy Xanax With Prescription
Cost Of Tramadol

20 July, 2008

Back to this

Filed under: Uncategorized — adrian @ 11:30 pm

After over a year I am back to hacking at this code. I’ve tried a couple of would be optimizations - such as storing all the converted cartesian points in a hash - but while they seem to speed things up on test, they fail in the real world - where the task to serve the “scores on the doors” page of HateMyTory in something less than 23 seconds. Needs more work!

But I will probably post a new version - with whitespace etc tidied in due course regardless.

4 April, 2007

Current state of play

Filed under: Uncategorized — adrian @ 10:25 am

Total Elapsed Time = 0.216515 Seconds
User Time = 0.166515 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
18.0   0.030  0.030    255   0.0001 0.0001  Image::Pngslimmer::sortonaxes
18.0   0.030  0.030    507   0.0001 0.0001  Image::Pngslimmer::getRGBbox
15.0   0.025  0.025  10152   0.0000 0.0000  Image::Pngslimmer::convert_toxyz
12.0   0.020  0.020     31   0.0006 0.0006  Image::Pngslimmer::unfilterpaeth
12.0   0.020  0.049     18   0.0011 0.0027  Compress::Zlib::BEGIN
11.4   0.019  0.117      1   0.0191 0.1173  Image::Pngslimmer::index_mediancut
6.01   0.010  0.010      7   0.0014 0.0014  IO::Uncompress::RawInflate::BEGIN
6.01   0.010  0.020      9   0.0011 0.0022  IO::Compress::Gzip::BEGIN
6.01   0.010 -0.000     60   0.0002      -  Exporter::import
6.01   0.010  0.010    254   0.0000 0.0000  Image::Pngslimmer::getbiggestbox

Uk viagra body building from sports supplement
Xanax libido
Fast delivery phentermine
Fastin
Viagra patent infringement reexam
Gemfibrozil
Codeine
Viagra in woman
Phentermine sites that ship cash on delivery
Celexa
Free prescription sample viagra
Methotrimeprazine
Hexoprenaline
Generic hydrocodone
Thiopropazate
Phentermine hoodia
Phentermine xenical diet pill
Lowest price for phentermine
Cialis compare levitra
Levodopa
Phentermine ingredients
Hyzaar
Online pharmacy phentermine xenical meridia
Prozac drug interaction with xanax
Diet pills phentermine
Meridia weight loss pill
Eon phentermine
Generic viagra no perscription needed
Ingredient in phentermine
Naprosyn
Cod online tramadol
Flosequinan
Blindness cialis
Cefprozil
Free viagra online
Dapsone
Online pharmacies with doctor consultation for viagra
Information phentermine shortage
Digoxin
Lowest priced viagra in the uk
Levitra
Diltiazem
Ceclor
Fluoxetine
Buy Acyclovir
Ionamin phentermine
50mg generic viagra
Clidinium
Viagra lowest prices
Hydrocodone bitartrate acetaminophen
Imitrex
Acetylcholine
Cialis order
Cholecalciferol
Women using viagra
Lowest prices viagra
Phentermine without prescription and energy pill
Viagra cheap prescription
Buy cheap generic viagra
Effects long phentermine side term
Tranylcypromine
Lomotil
Phenylpropanolamine
Cheap tramadol no prescription
Fioricet
Natural phentermine
Cheap viagra canada
Tramadol pharmacy
Purchase hydrocodone
Viagra patent
Overnight phentermine shipping
Pfizer xanax
Soma getting
Half price viagra
Nasalcrom
Bumetanide
Dacarbazine
Viagra sale uk
Cialis comparison viagra
Octreotide
Diamox
Pyridoxine
Buy soma online
History of phentermine use
Buy online prescription viagra without
Tramadol next day
Fluvastatin
Cialis vs viagra
Overnight shipping viagra
Discount ambien
Book buy online order viagra
Phentermine drug information
Dofetilide
25 mg viagra
Phentermine and carbs
Best buy phentermine
Mirtazapine
Effects of phentermine
Oseltamivir
Cialis immunity
Side effects of tramadol hydrochloride
Tramadol sale
Estrace
Viagra overdose
Canadian no phentermine prescription
1 loss phentermine pill weight
Viagra success story
Information about street drugs or xanax bars
Hydrocodone withdrawal symptom
Metronidazole
Metoprolol
Buy viagra canada
Aspirin
Viagra without prescription
Mexican pharmacy viagra
Levivia and viagra
Phentermine medication
Blue 30 mg 90 free shipping phentermine pharmacy
Piperazine
Does phentermine speed up metabolism
Xanax and grapefruit
Cialis online discount
Zyban
Viagra testimonial
Estraderm
Dienestrol
Lowest price phentermine
Effexor
Xanax online pharmacy
Info on meridia
Cheapest phentermine online free shipping
Buy Alprazolam
Phentermine 37.5 pay by money order
Actos phentermine aciphex imitrex
Buy phentermine epharmacist
Midazolam
Generic viagra soft tab
Tramadol
Buy cheap purchase uk viagra
Chlorpropamide
Estrogen
Buy cialis soft tabs
Flutamide
Buy online phentermine shipping
Soma online pharmacy
Chlorpromazine
Generic viagra cheap
Flagyl
Amsterdam holland viagra
Viagra canada prescription

3 April, 2007

References do speed things up after all

Filed under: Uncategorized — adrian @ 12:44 pm

Even with the corrected code the references work faster - each call is about 2/10,000ths of a second faster for the test PNG. Not much in itself, but as the function is being called 254 times, it does make a difference.

1 April, 2007

I am an idiot

Filed under: Uncategorized — adrian @ 8:11 pm

Of course, the code below is broken as it searches through an array with zero elements. Updated code etc to follow…

31 March, 2007

References do speed things up

Filed under: Uncategorized — adrian @ 6:54 pm

I had tried a few times to speed things up by making better use of references, but before now, haven’t really managed it… but changing the code from this:

sub getbiggestbox {
#return the index to the biggest box
my ($boxesin, @boxesin, $i, $n);
$boxesin = shift;
@boxesin = @$boxesin;
$n = scalar(@boxesin)/4; #each box has 4 items stored about it
my $z = 0;
my $counter = 0;
my $biggest = 0;
for ($i = 0; $i < $n; $i++)
{
#length is 4th item per box
$counter = $i * 4 + 3;
if ($boxesin[$counter] > $z)
{
$z = $boxesin[$counter];
$biggest = $i;
}
}
return $biggest;
}

To this:

sub getbiggestbox {
#return the index to the biggest box
my ($boxesin, @boxesin, $i, $n);
$boxesin = shift;
$n = scalar(@boxesin)/4; #each box has 4 items stored about it
my $z = 0;
my $counter = 0;
my $biggest = 0;
for ($i = 0; $i < $n; $i++)
{
#length is 4th item per