Skip to content

Commit b3ca76e

Browse files
authored
perf: Memory alignment to improve operatorCache memory efficiency (#366)
1 parent 8a1f559 commit b3ca76e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fd_operator_cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ func newOperatorCache() *operatorCache {
2828
}
2929

3030
type operatorCache struct {
31-
locked int32
3231
first *FDOperator
3332
cache []*FDOperator
33+
locked int32
3434
// freelist store the freeable operator
3535
// to reduce GC pressure, we only store op index here
36-
freelist []int32
3736
freelocked int32
37+
freelist []int32
3838
}
3939

4040
func (c *operatorCache) alloc() *FDOperator {

0 commit comments

Comments
 (0)