Hacker News new | ask | show | jobs
by masklinn 3774 days ago
> I totally agree with you on this. The code for all three languages is clearly not optimal.

That's not really my point. My point's we have no idea what TFA is trying to do or see[0], so you may be able to say "this is stupid and nonsensical" because it is[1], but you can't say "I've got a better version" then provide something with a completely different behaviour.

[0] most likely they just threw some shit at the wall, ended up with relatively long runtimes and called that a benchmark

[1] or maybe not, maybe it's a reduction of actual workload in the system doing computation based on some sort of dynamic number of items so you can't preallocate the intermediate storage and the point's to compare reallocation overhead[2]

[2] not very likely though, considering you never need the array in the first place as you're just summing each item with the previous one, then summing every 100 item of that… anyway

1 comments

>, but you can say ""

I'm guessing you meant to type, "but you can't say"

Correct guess. Fixed.