Adding ruby performance tweaks