C
C#2w ago
Theos

Benchmarking code

Hey, so I made myself a simple template for advent of code. Here is the code: https://pastebin.com/Z0dXuPNR I have 3 questions: - benchmarking takes quite some time. Around one minute I would say. Is this the expected time? I've never used this benchmark lib so I can't tell. - I want to separate loading the input / parsing the input / solving into 3 benchmarks cuz I want to see what takes the most time, how can I do this? - Is my template even okayish?
Pastebin
public static class Program{ public static readonly Dictionary -...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
2 Replies
Sossenbinder
Sossenbinder2w ago
You can do all the preparation in a globalsetup, there are a few lifecycle hooks supported by BDN It's also normal it takes some time It will usually pre-warm, and then run multiple cycles of your code So bdn can make sure it might not just accidently measure a very fast or slow run, but rather gets a good amount of iterations in to spot and even out local inconsistencies
Theos
TheosOP2w ago
oke, thanks 👍
Want results from more Discord servers?
Add your server