On 12/11/23 20:19, Waldek Hebisch wrote:
On Mon, Dec 11, 2023 at 12:05:52PM +0800, Qian Yun wrote:
Let's test this version: only '$timedNameStack' is initialized once,
the rest stats variables are initialized for each line typed into
interpreter.
Well, first question is: what timing routines should do?
Currently, ')read' is printing time for each toplevel expression
in input file separately. It is reasonable to handle
'read' executed via system command in the same way. However,
then we have question what should be included in timing report
for statement including call to system command?
If you only want stats on the whole block, then by arranging
some variables to indicate inner call of 'interpret' to stop
collection and reporting (and init) of stats.
But if you want stats reporting in each line of a block,
and a total stats on the whole block, then it's more complicated
but still doable: using local instead of global variable to
store the stats.
- Qian
Beside 'read' we can call intepreter via 'interpret_block',
'parseAndEvalStr' and 'interpret'. Arguably 'interpret'
should not be timed separately but as part of caller.
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/0f100204-f4f0-43e8-a327-978f54149f6c%40gmail.com.