Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This might not be 100% applicable to your situation, but FWIW I did some research into this a while back, here's what I wrote back then: </p> <p>I've been meaning to try out grant skinners performance test thing for a while, so this was my opportunity.</p> <p>I tested the native compare, the iterative compare, a reverse iterative compare (because i know they're a bit faster) and finally a compare using blendmode DIFFERENCE.</p> <p>The reverse iterative compare looks like this:</p> <pre><code>for (var bx:int = _base.width - 1; bx &gt;= 0; --bx) { for (var by:int = _base.height - 1; by &gt;= 0; --by) { if (_base.getPixel32(bx, by) != compareTo.getPixel32(bx, by)) { return false; } } } return true; </code></pre> <p>The blendmode compare looks like this:</p> <pre><code>var test:BitmapData = _base.clone(); test.draw(compareTo, null, null, BlendMode.DIFFERENCE); var rect:Rectangle = test.getColorBoundsRect(0xffffff, 0x000000, false); return (rect.toString() != _base.rect.toString()); </code></pre> <p>I'm not 100% sure this is completely reliable, but it seemed to work.</p> <p>I ran each test for 50 iterations on 500x500 images. </p> <p>Unfortunately my pixel bender toolkit is borked, so I couldn't try that method. </p> <p>Each test was run in both the debug and release players for comparison, notice the massive differences!</p> <p>Complete code is here: <a href="http://webbfarbror.se/dump/bitmapdata-compare.zip" rel="nofollow noreferrer">http://webbfarbror.se/dump/bitmapdata-compare.zip</a></p> <p><img src="https://i.stack.imgur.com/Q2H2a.png" alt="graph"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload