Sander,
How big? How slow?
You can reply to me off or on list.
About 8 to 10 years ago, we had a large effort to improve this.
Now customers push many megabytes of prefix-sets several times a day and it works.
I have sent some questions internally to get a better answer.
Related, in 7.2.1, we added the as-set, which allows you to filter BGP routes by origin-as.
It is similar to as-path-set.
as-path-set is slow, using a linear lookup, but it is versatile, allowing ios-regex.
as-set can only use numbers and only for origin-as, but it is fast using a log(N) lookup.
Regards,
Jakob.