Has anyone got tips on how to speed up this eigen code that is the slowest part of my process?
Simplified, I have this in an inline function definition with argument ArrayXf& z:
z += 0.175;
z = (z < 0).select(0.0, (z*z*z) / (z*z*z + z*z + 0.1));
Can this be sped up by clever use of pre-allocated temp arrays? Or is eigen already more clever than anything I'd likely come up with? And how can I tell, or where should I look to learn more about how to think about optimizing such things?
Is select fast? Or are there better ways to threshold things?
I'm on an Intel platform, but ultimately also targeting Arm NEON, in case that matters.
Dick