improved performance at code level

Signed-off-by: Mario Ray <sigma5@sigma5-desktop.(none)>