Tail pad optimization, cache friendlyness and C++ interrop

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 18 14:57:39 PDT 2014


On Wednesday, 18 June 2014 at 20:58:46 UTC, Ola Fosheim Grøstad
wrote:
> On Wednesday, 18 June 2014 at 15:25:11 UTC, Luís Marques wrote:
>> Maybe I missed something in this discussion, but unless you are
>> not including jumps/loops in those N instructions, just because
>> the number of instructions and memory is bounded does not mean
>> you can prove (for arbitrary programs) that the program
>> terminates.
>
> Yes, you can. You just run it until it enters a previous state. 
> At that point you have an infinite loop and it won't terminate.
>
> Since you only have a finite number of possible states and you 
> always move from one state to another the proof of this becomes 
> trivial. The worst case time complexity is the same as the 
> number of possible states.

Granted infinite resources. Good, now that we ruled that thing
out, can we talk about the subject, or do we need to continue
talking about imaginary things ?


More information about the Digitalmars-d mailing list