is the number returned by this equals to the actual count of cycles consumed?
for example:
let countA = IC.countInstructions(func() {
var a = 1;
var i = 0;
while (i < pow) {
a := a * 2;
i += 1;
};
});
is the number returned by this equals to the actual count of cycles consumed?
for example:
let countA = IC.countInstructions(func() {
var a = 1;
var i = 0;
while (i < pow) {
a := a * 2;
i += 1;
};
});
No, countInstructions returns WebAssembly instructions, not cycles.
await (counter resets there).Use it for relative profiling, comparing implementations or seeing how cost scales. Not for exact cycle accounting.
Holy crap forgot about this. Thanks quint.
If you don’t mind can you look at the design doc I put up for the next version of canic? Run it through an LLM with more specific feedback as you’re more knowledgeable about this.
@bjoern - please give it a look too.
Cluj Napoca lol. Don’t make me come there.
Fabricated screenshots…lol. This is typical in the Toko discord.
Stop tagging me please. I’m not interested in this foolishness.