Am 06.09.18 um 14:56 schrieb Paul Smith:
On Thu, 2018-09-06 at 08:05 +0000, Tiphaine Turpin wrote:
The static pattern solution looks very nice, thanks. It seems to work
fine in the real Makefile. And there is no visible performance
impact, as far as I can tell (I'm not sure about how efficiently
static pattern rules are implemented).
Static pattern rules are just another way of writing explicit rules.
As such, they're more efficient than pattern rules (since they are
applied directly when the target is needed, and no pattern matching or
searching is necessary).


I found the thread interesting to read, I recently came across static pattern rules as well and like them. Since you mention efficiency, I wonder if there's a threshold when pattern rules become more efficient than tons of explicit rules (imagine explicit rules for every .o in huge projects). Is there a number of objects when pattern rules are recommended over explicit rules or are explicit rules better regardless of the number of them? I would imagine that pattern rules require less memory and that the lookup for 10000s of explicit rules becomes a performance issue, too.

This is a theoretical question, I haven't had performance problems with any type (classic, static pattern or implicit pattern rules).

Best regards.


_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to