Skip to content

Optimization: Short-circuit and, or, and ?: if left side determines result and right side has no side effects #15

@lars-reimann

Description

@lars-reimann

Examples:

false and callToFunctionWithoutSideEffects()
true or callToFunctionWithoutSideEffects()
1 ?: callToFunctionWithoutSideEffects()

This can be done in the partial evaluator by relaxing the requirement that the right side must be evaluated to a constant.

Metadata

Metadata

Assignees

Labels

dsl 🗒️Issues regarding the domain specific programming languageperformance 🏃Speed things upreleasedIncluded in a release

Type

No type

Projects

Status

✔️ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions