IIRC this is a hot function. This will probably regress speed.