I doubt there is significant difference in memory usage. Modules are really lightweight structures. Here’s a measurement, though, using memusage:
- Without modules:
Memory usage summary: heap total: 45728473, heap peak: 19364334, stack peak: 50144
total calls total memory failed calls
malloc| 73180 41433864 0
realloc| 2612 739666 0 (nomove:1326, dec:1, free:0)
calloc| 1106 3554943 0
free| 81653 26646704
- With modules:
Memory usage summary: heap total: 48196844, heap peak: 19427256, stack peak: 41488
total calls total memory failed calls
malloc| 76011 43900414 0
realloc| 2489 713492 0 (nomove:1286, dec:1, free:0)
calloc| 1171 3582938 0
free| 86405 29067198