Skip to content

Commit

Permalink
AeCairoMatrix: Precalculate byteSize as a small speedup on instance c…
Browse files Browse the repository at this point in the history
…reation
  • Loading branch information
tinchodias committed Nov 27, 2023
1 parent 3641d9e commit 3433727
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Alexandrie-Cairo/AeCairoMatrix.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@ Class {
#category : #'Alexandrie-Cairo-Structures'
}

{ #category : #'field definition' }
AeCairoMatrix class >> byteSize [
^ 48
]

{ #category : #'field definition' }
AeCairoMatrix class >> fieldsDesc [
"
self rebuildFieldAccessors
self rebuildFieldAccessors.
self classSide compile: 'byteSize
^ ', self byteSize asString classified: 'field definition'.
"
^ #(
double sx; double shy;
Expand Down

0 comments on commit 3433727

Please sign in to comment.