Elektrine lite

← Feed

@thephd@pony.social

Post #2766126

2025-12-31 16:37 UTC

@JensGustedt@digitalcourage.social yeah, there is a lot of issues that immediately pop up because the optimization tools in the base language are sort of weakly defined. But it's hard to write good specification for the more aggressive parts of optimization and aliasing control here, to the point that I'm not even sure how to start talking about this.

Replies (2)

  • @uecker@mastodon.social 2025-12-31 16:49

    @thephd@pony.social @JensGustedt@digitalcourage.social I think your benchmark is misleading here. First, compile-time unrolling will always shine in micro benchmarks and often suck in bigger projects. It also makes compile times long. But it can be useful, but I think there are much better ways to achieve this than templates: An optimizer can all do this perfectly, but there is currently no way to have explicit control. But I think this is entirely orthogonal to how nested functions shown be designed.

    Open ##2766127

  • @thephd@pony.social @uecker@mastodon.social clang have partial solutions for this, e. g. they have an attribute that promisses that pointer parameters do not escape. Unfortunately they have their big problem that they can't attach these kind of properties to function types. so all information is lost once you convert to a function pointer.

    Open ##2766134