Skip to content

Graph execution time as a function of the size of the input #41

@tmbb

Description

@tmbb

There should be a way of graphing the execution time as a function of the size of the input, so that one can demonstrate the time complexity of the algorithm empirically in graphs like this:

image

The size of the input can't be determined automatically, but it could given by the user in the form of a tuple: {input_size, input_value} or some similar API. I understand that this might require a new top-level Benchee function, and that might be a change too big to implement.

But even if this change isn't possible, just plotting the execution time of all the inputs in the same graph would be a big improvement.

In my concrete example, I want to show that a an implementation of a programming language lexer (let's say, implementation 1) has complexity roughly linear on the size of the file while the alternative impelmentation (say, implementation 2) has supralinear complexity. I can see how, as the input size rows, implementation 2 gets slower and slower than implementation 1, but I can't compare the execution time of the implementation 1 with itself as the input grows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions