This message was deleted.
# codereview
s
This message was deleted.
m
Optimize in which direction? Readability, speed, memory? Towards generalization or modularization?
v
@Matteo Mirk thanks for replying me. I think Speed with memory efficent
m
Then you would need to write a benchmark for this code an measure the hot points, then you can decide where to intervene. Performance optimization can’t be done blindly just reading the code (apart from some well-known optimization patterns). It also depends on your scenario and usages. Keep in mind that often you can’t push optimization too far towards speed AND memory: in many scenarios those vectors are orthogonal.
v
okk thanks @Matteo Mirk