Measuring performance in a hardware-agnostic way - eviltoast

Is there a way to measure performance without depending on the hardware, i.e. two entirely different computers get the same score for the same code?

I could probably run the program on a server or something, but something local feels more reliable.

  • Sekoia@lemmy.blahaj.zoneOP
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    One option could be to emulate a full CPU and run it on that, and count the cycles on that. One issue is linking/syscalls. Maybe compiling to smth like WASM could work?

    • stifle867@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      I would be interested to hear if you get far down that road. It sounds infinitely more difficult than running code and timing it.

      Are you able to expand what problem lead you to this question (out of curiosity)?