I just tested a single mail rule which moves messages with a certain string in the subject from my inbox to a special folder. It processed my inbox at about 100 messages/second, which is not unbearable, but you could be doing much better. I presume if the rule was for the message body it could be worse. I think an improvement of at least one order of magnitude, if not two, should be possible. Maybe integrating something like Lucene or Xapian could give a lot of performance benefits for mail rules and general search as well.
(Originally posted by psivesely on GitHub.)