News for hackers. Stuff that matters.
Re:TerrariaClone – An incomprehensible hellscape of spaghett... by 35bge57dtjku on Thursday October 12, 2017 @10:10PM (#15462819)
> On their own, % and / are way slower than +, -, *, <<, >>.

And the branch instruction is free??

Re:TerrariaClone – An incomprehensible hellscape of spaghett... by hacking_again on Thursday October 12, 2017 @11:40PM (#15463117)
More or less, assuming you can predict it. But there's a penalty for misprediction. So it boils down to whether using % frequently (either as a native instruction or as a sequence of instructions) is more or less expensive than predicting a branch frequently, given a certain misprediction rate.
Re:TerrariaClone – An incomprehensible hellscape of spaghett... by 35bge57dtjku on Saturday October 14, 2017 @05:18PM (#15474369)
> More or less, assuming you can predict it. But there's a penalty for misprediction.

Yeah, no, that's not free.

Re:TerrariaClone – An incomprehensible hellscape of spaghett... by hacking_again on Saturday October 14, 2017 @07:13PM (#15474851)
Ok, so what changes would you make to my explanations?