Introducing selective datatype indexing for datatype reasoning optimisations