Dramatically speed-up attribute processing!

I don't know exactly what and why this code do, but result is same