Hi Alex,

In this case, the new optimizer actually is strictly better. Mostly because
it uses shorter instruction encodings. For example, it uses inc rbx whereas
old factor used add rbx, 1. But the old factor had a compiler pass called
"height normalization" which in some situations made it emit superior code.
But it also sometimes generated faulty code so it had to be removed. :) I
have been working on a new step to get rid of redundant height changes but
it is not done. See https://github.com/factor/factor/issues/1617

2018-01-17 23:17 GMT+01:00 Alexander Ilin <ajs...@yandex.ru>:

> Hello, Björn!
>
> Thanks for the explanation! I've already lost hope of seeing a reply to
> that, but you appeared out of nowhere and saved the day. Thank you!
>
> Are you saying there was a different (better?) optimizer in the previous
> Factor releases? What happened to it?
>
> 17.01.2018, 22:25, "Björn Lindqvist" <bjou...@gmail.com>:
>
>
> r14 contains the datastack top pointer. It is incremented by 0x10 which is
> 16 bytes or 2 cells. Your code was supposed to put two items on the stack,
> but then the optimizer did a great job and noticed that the values didn't
> have to be put on the stack but could be kept in registers. But it didn't
> optimize away the stack increment/decrement. Possibly, the optimizer in
> 0.96 or 0.97 did a better job at optimizing code like that.
>
>
>
> ---=====---
> Александр
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>


-- 
mvh/best regards Björn Lindqvist
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to