What is Project Memory in Modulus?
The inliner uses a novel hazard analysis to model the order of effects in each callee function. Nonetheless, its ability to construct the necessary safety proofs is quite limited. For example, if the calls f() and g() are simple accessors, it would be perfectly safe to call them in either order. Indeed, an optimizing compiler might use its knowledge of the internals of f and g to safely reorder the two calls. But unlike a compiler, which generates object code that reflects the source at a specific moment, the purpose of the inliner is to make permanent changes to the source, so it can’t take advantage of ephemeral details. As an extreme example, consider this start function:
,详情可参考PG官网
logger.info(f"Number of dot products computed: {len(results)}")
Виктория Кондратьева (Редактор отдела «Мир»)
Фото: Inquam Photos / Octav Ganea / Reuters