ants icon indicating copy to clipboard operation
ants copied to clipboard

doing so to call invoke does a lot of memory allocations.

Open superdolt opened this issue 4 years ago β€’ 1 comments

doing so to call invoke does a lot of memory allocations.

possible to replace {}Interface with [][]byte or something similar? coz the allocation generated by using panjf is rather unbearable in high use case.

            var val [][]byte
            val = append(val,[]byte{0})
            val = append(val,[]byte{uint8(k)})
            val = append(val,[]byte{uint8(v)})
            val = append(val,[]byte{uint8(c)})
            val = append(val,kX) 
            val = append(val,b)
            pdbrpool.Invoke(&val)

superdolt avatar Jul 23 '21 13:07 superdolt

Sorry, interface{} is for generic use cases, and why would it cause large memory allocation?

panjf2000 avatar Jul 24 '21 11:07 panjf2000

Closing it for inactivity

panjf2000 avatar Mar 03 '23 09:03 panjf2000