![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Hi Hans, Would new (pdf)etex primitives like these help benchmarking context? Two static read-only values that amend the normal TeX ones like \time and \year, giving the passed seconds since 1 jan 1970 at start-of-run: \epochseconds % integer part \microseconds % fractional part (between and 0-1000000) And one dynamic one: \microinterval % interval since start-of-run, in microseconds The static seconds and microseconds have be split in two because the multiplication of two C long-s cannot fit in one \count register. I need the initialization values only so that I can create meaningful intervals, but I thought it might be useful to have them available. If you prefer something more or different, let me know. Taco
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Taco Hoekwater wrote:
Hi Hans,
Would new (pdf)etex primitives like these help benchmarking context?
Two static read-only values that amend the normal TeX ones like \time and \year, giving the passed seconds since 1 jan 1970 at start-of-run:
\epochseconds % integer part \microseconds % fractional part (between and 0-1000000)
And one dynamic one:
\microinterval % interval since start-of-run, in microseconds
The static seconds and microseconds have be split in two because the multiplication of two C long-s cannot fit in one \count register.
I need the initialization values only so that I can create meaningful intervals, but I thought it might be useful to have them available.
nice
If you prefer something more or different, let me know.
maybe something \basicloop <counter> {token list} (kind of \testfeature in context) so that one does not have interference of loop macros; i assume that a native loop has neglectable consequences (this reminde me that we had some discussion about reals i.e. dimenless dimens and that you had a brain wave about that) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Hans Hagen wrote:
maybe something
\basicloop <counter> {token list}
(kind of \testfeature in context) so that one does not have interference of loop macros; i assume that a native loop has neglectable consequences
I was talking about the time measuring stuff, actually ;-) You have to be more precise about that \basicloop thing: does it need access to the <counter>? Is the <counter> a literal, or a register? Should this thing be expandable? Do you need an excape hatch?
(this reminde me that we had some discussion about reals i.e. dimenless dimens and that you had a brain wave about that)
I hope to get to that soon as well. Taco
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Taco Hoekwater wrote:
Hans Hagen wrote:
maybe something
\basicloop <counter> {token list}
(kind of \testfeature in context) so that one does not have interference of loop macros; i assume that a native loop has neglectable consequences
I was talking about the time measuring stuff, actually ;-)
You have to be more precise about that \basicloop thing: does it need access to the <counter>? Is the <counter> a literal, or a register? Should this thing be expandable? Do you need an excape hatch?
for the moment just a simple loop n-times, so that we can do <ask time> <loop test macro n times> <ask time> (so it is kind of related to timing, i can even imaging that the loop thing reports the runtime automatically) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
for the moment just a simple loop n-times, so that we can do
<ask time> <loop test macro n times> <ask time>
(so it is kind of related to timing, i can even imaging that the loop thing reports the runtime automatically)
Ah, I see. Will check this out, but if it requires lots of extra pascal code (which it might), I will not implement this. Taco
participants (2)
-
Hans Hagen
-
Taco Hoekwater