SMath() lib updated

Performance improvements