Reply to Re: Any Intelligent Thoughts On This?

Your name:

Reply:


Posted by Jeckyl on 01/21/07 02:09

In case you want to know why the code I put forward is faster, the reason is
that one of the main factors in AS speed is the number of opcodes it
compiles to (as there is a similar large amount of overhead for each
opcode). If you look at the compiled code for the two methods of padding.
you'll see that the hatter code requires more opcodes .. even if the padding
with zero is not required. And, of course, my code works with all the
possible rgb colors that getPixel returns; hatters fails in many cases.

Hatter compiled code:
push 'color_pick', 16, 1, 'clr'
getVariable
push 'toString'
callMethod
setVariable
push 'color_pick'
getVariable
push 'length'
getMember
push 6
lessThan
not
branchIfTrue label2
push 'color_pick', '0', 'color_pick'
getVariable
add
setVariable
label2:


Jeckyl compiled code:
push 'color_pick', -6, 1, '000000', 16, 1, 'clr'
getVariable
push 'toString'
callMethod
add
push 'substr'
callMethod
setVariable

--
Jeckyl

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация