Skip to content

Cost evaluation feedback #3

@pdarragh

Description

@pdarragh

Via @__gparmer on Twitter:

Another potential use, that is likely already on your radar: If you can interpret the code, you can apply a cost function to it (while interpreting), which can provide feedback on how effective different optimizations are.

Different cost functions (loads are expensive vs. forward branches are expensive vs. instructions in general are expensive) can make the point to students that optimizations are architecture-specific.

I haven't thought about this one much, but adding such functionality could be neat and may not be terribly difficult? I figure it would essentially amount to just keeping a running total of costs incurred during step operations. The most primitive such cost function could just be counting the number of steps taken!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions