Measuring performance in a hardware-agnostic way

3 years ago by Sekoia to c/advent_of_code

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.

load all comments
FuzzChef 7 points 3 years ago

Yes, you can consider the algorithmic complexity of your code, which is independent of any hardware.

path: 0 5744144, hotness: undefined, score: 7, children: 2
Sekoia 2 points 3 years ago

Sure, but that makes a lot of optimizations nonexistent (e.g. cloning the input on an O(n) algorithm is "free")

path: 0 5744144 5744695, hotness: undefined, score: 2, children: 1
damium 4 points 3 years ago

You don't need to use big-O. You can calculate the full complexity in algebraic notation. It's just a lot more work as you don't get to discard terms.

path: 0 5744144 5744695 5750748, hotness: undefined, score: 4, children: 0
advent_of_code
advent_of_code

@programming.dev

login for more options
1248
184
1

An unofficial home for the advent of code community on programming.dev! Other challenges are also welcome!

Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Everybody Codes is another collection of programming puzzles with seasonal events.

EC 2025

AoC 2025

Solution Threads

M T W T F S S
1 2 3 4 5 6 7
8 9 10 11 12

Visualisations Megathread

Rules/Guidelines

  • Follow the programming.dev instance rules
  • Keep all content related to advent of code in some way
  • If what youre posting relates to a day, put in brackets the year and then day number in front of the post title (e.g. [2024 Day 10])
  • When an event is running, keep solutions in the solution megathread to avoid the community getting spammed with posts

Relevant Communities

Relevant Links

Credits

Icon base by Lorc under CC BY 3.0 with modifications to add a gradient

console.log('Hello World')

go to feed...