In order to modify libalias for performance, the existing functionality must not change.
This review is only a starter of the larger set of functional tests which needs to be upheld during the upcoming development. More test cases will come in further reviews.
I'll keep the review small enough to be readable by an external person and hence the commits small enough to not disturb the developer community.