News for hackers. Stuff that matters.
Re:Assembly Language: Still Relevant Today by userbinator on Friday November 06, 2015 @11:16PM (#10523683)
short sections of self-modifying code execute more slowly

Unless you're optimising for size, SMC'ing little pieces is definitely going to be slower. But e.g. in loops that do a few hundred iterations, saving a cycle or two by getting rid of some opaque predicates quickly adds up and the cache/pipeline-flushing overhead (few hundred cycles at most) becomes insignificant.

After all, as the parent comment says, a JIT is basically SMC'ing huge blocks of code, and it's definitely faster than the equivalent alternative of a bytecode interpreter.

Re:Assembly Language: Still Relevant Today by wyager on Saturday November 07, 2015 @01:43AM (#10523999)
Modern branch predictors handle opaque predicates (assuming you mean branches that don't change). Jump instructions in tight, repetitive loops on superscalar out-of-order processors are basically free.