[Vm-dev] BitBLt performance work
Juan Vuletich (mail lists)
juanlists at jvuletich.org
Sat Mar 16 19:10:10 UTC 2013
Great trick, Bert!
Tim, also include other primitives in BitBlt. In Cuis, they are:
#primDisplayString:from:to:map:xTable:kern: Used for ALL text!
#copyBitsAgain
#copyBitsTranslucent:
#drawLoopX:y:
Cheers,
Juan Vuletich
Quoting Bert Freudenberg <bert at freudenbergs.de>:
>
> On 2013-03-15, at 20:01, tim Rowledge <tim at rowledge.org> wrote:
>
>> I'm working on making bitBlt faster
>
> Awesome! Maybe getting some usage statistics would be helpful. Very
> likely a handful of combinations dominates the workload. That's
> actually easy to verify.
>
> I renamed #copyBits to primCopyBits and then did this:
>
> ===================================
> copyBits
> BitBltStats ifNotNil: [ BitBltStats add: {
> destForm isForm ifTrue: [destForm depth].
> sourceForm isForm ifTrue: [sourceForm depth].
> halftoneForm isForm ifTrue: [halftoneForm depth].
> combinationRule.
> colorMap ifNotNil: [colorMap class]}].
> ^ self primCopyBits
> ===================================
>
> Then in a workspace you can start/stop the data collection:
>
> ===================================
>
> "start"
> BitBltStats := Bag new
>
> "stop"
> BitBltStats sortedCounts inspect. BitBltStats := nil
>
> ====================================
>
> Here's what I go an Etoys image doing normal Etoys stuff:
>
> 23709->#(16 nil nil 3 nil)
> 20471->#(16 nil nil 3 Bitmap)
> 7852->#(16 32 nil 34 nil)
> 2961->#(16 16 nil 3 nil)
> 1181->#(16 1 nil 25 Bitmap)
> 958->#(16 16 nil 25 nil)
> 702->#(16 1 nil 3 Bitmap)
> 702->#(16 16 nil 1 nil)
> 702->#(16 1 nil 1 Bitmap)
> 339->#(16 4 nil 25 Bitmap)
> 190->#(32 nil nil 3 nil)
> 190->#(16 2 nil 25 Bitmap)
> 42->#(2 2 nil 3 nil)
> 40->#(32 32 nil 3 nil)
> 18->#(8 1 nil 25 Bitmap)
> 9->#(32 8 nil 3 Bitmap)
> 5->#(16 16 nil 33 Bitmap)
>
> 26624->#(16 nil nil 3 Bitmap)
> 10860->#(16 nil nil 3 nil)
> 2557->#(16 16 nil 3 nil)
> 2068->#(16 32 nil 34 nil)
> 1612->#(16 16 nil 25 nil)
> 932->#(16 1 nil 25 Bitmap)
> 822->#(16 1 nil 3 Bitmap)
> 822->#(16 16 nil 1 nil)
> 822->#(16 1 nil 1 Bitmap)
> 343->#(1 16 nil 1 Bitmap)
> 343->#(1 1 nil 33 Bitmap)
> 343->#(1 16 nil 3 Bitmap)
> 70->#(16 4 nil 25 Bitmap)
> 45->#(32 nil nil 3 nil)
> 26->#(16 2 nil 25 Bitmap)
> 14->#(8 1 nil 25 Bitmap)
> 7->#(32 8 nil 3 Bitmap)
> 1->#(16 16 nil 33 Bitmap)
>
> If using Smalltalk tools (System Browsers etc), it looks a bit different:
>
> 39350->#(16 32 nil 34 nil)
> 23318->#(16 nil nil 3 nil)
> 1872->#(16 16 nil 3 nil)
> 1512->#(16 nil nil 3 Bitmap)
> 794->#(16 16 nil 25 nil)
> 634->#(16 1 nil 25 Bitmap)
> 624->#(16 1 nil 3 Bitmap)
> 624->#(16 16 nil 1 nil)
> 624->#(16 1 nil 1 Bitmap)
> 73->#(32 32 nil 3 nil)
>
> Might be interesting to see how other images use it. And maybe add
> in some instrumentation to measure actual time spent.
>
> For Etoys and Scratch in particular, WarpBlt is also rather important.
>
> - Bert -
>
>
>
Cheers,
Juan Vuletich
More information about the Vm-dev
mailing list