Sujet : Re: On my AMD FX-8370 I don't benefit from a compact code area.
De : albert (at) *nospam* spenarnc.xs4all.nl
Groupes : comp.lang.forthDate : 28. Feb 2025, 12:28:51
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$1d1899a8$53b2244b@1538f9e6019e56d3>
References : 1 2
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
2025Feb27.191846@mips.complang.tuwien.ac.at>,
Anton Ertl <
anton@mips.complang.tuwien.ac.at> wrote:
<SNIP>
Thanks for the insight.
<SNIP>
So I applaud that you have done the right thing and completely
separated code from data. You may not see a benefit on Sieve, but
there may be a difference in a different program (and you may not even
notice until you measure both variants).
Actually I have not done that. I added another configuration file to
the 20 to be able to build a separation between code and data and
that for 64 bit linux only.
I have tested it for one of the three assembler only.
So ciforth is merely prepared for such a change.
I introduced a
define( {_SEPARATED_}, _yes)dnl
All other configrations have
define( {_SEPARATED_}, _no)dnl
The other configurations are not affected because this line is in the
prelude.m4 so the latter is default.
The switching of segments is governed by _SEPARATED_ in the fasm.m4
gas.m4 and nasm.m4 macro files, because segment switching is dependant
on the actual assembler used.
So are no changes to change generic i86 assembler base (ci86.gnr) .
The slight complication will not make it into a release unless there
is a convincing evidence that it is beneficial and I have used it myself
extensively.
It was more of an exercise to convince myself that I could add that.
(There is one single i86 file source, and the rest 16/32/64,
linux/DOS/windows and data separation is done by macro's governed by
configuration files.)
You draw attention to the effect of assembler snippets in large programs.
This situation is unlikely to happen in ciforth.
If machine code is added because of speed that is not likely done
by CODE END-CODE words, but by compacting words into a block by
inlining everything. This would not be entangled with data.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023 proceedings: http://www.euroforth.org/ef23/papers/
EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/
-- Temu exploits Christians: (Disclaimer, only 10 apostles)Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style WallArt For Home, Office And Garden Decor - Perfect For Windows, Bars,And Gifts For Friends Family And Colleagues.