Open
Conversation
…out `-gmt 1`, because the return value would be -3600): % clock scan "01.01.1970" -locale current -format %x time value too large/small to represent
…" the execution limited by fixed time (in milliseconds) instead of repetition count (more precise results, to prevent very long execution time it is no more necessary to estimate repetition count)
… to 5000 now), because otherwise sporadically stutters on some platforms on very fast iterations (<= 1µs/#)
…ance counters actualized in calibration thread in UpdateTimeEachSecond; This entails that sometimes sporadically time-drifts resp. jump-esque time-shifts occurred, what for example produces very confusing results during time measurement. [unix] wrong cast fixed in TclpGetWideClicks: multiplication with 1000000 in long int may cause overflow
…00000; more precise threshold handling after NativeGetTime fix.
…verhead):
- use pre-compiled byte code and TclNRExecuteByteCode inside measure cycle;
- calibration possibility (through call of `timerate {}` to enter calibration cycle and obtain current overhead);
# Conflicts:
# win/test-performance.tcl
… better precision `timerate {} 10000` could be used) + increase minimal threshold;
…ate? ?-overhead double? command ?time?;
limit default calibration cycle by precision of 0.01% (for exact precision an exact time could be given e. g. `timerate -calibrate {} 10000`);
This was referenced Jan 3, 2017
Closed
… if object internal representation changed, example:
`set code { regexp {\w} $code }; timerate $code`
# Conflicts:
# generic/tclCmdMZ.c
Owner
Author
|
Have a small amend for this trunk-based branch in d6d3cb9, that was forgotten, because would be not necessary in tclSE at all (the objects could own more as one slot with internal representation there, so byte-code will be not released, if e. g. unicode representation needed, so exists as long as the object exists). Without this fix following code produces a segfault through removed byte-code representation in the meantime: |
…(without estimated time of whole overhead)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a interim PR back-porting some features from my tclSE engine.
Currently used as merge-point to #2 to compare performance between original tcl-clock and new tcl-clock engines.
Contains:
timerate, that allows to do the measurement of code executing more precise and in opposition to commandtimeis time-related (not count-related);Additionally pros of command "timerate"
timeratecan be calibrated to minimize influence of measurement overhead (and byte code execution overhead) -timerate -calibrate {}.Following example diff shows influence of measurement and execution overheads (the times retrieved for execution of empty scope-block resp. of each
set i ...is more precise after calibration), e. g. in reality the execution time ofset i ...amounts to ca. 0.057 µs/#:timerate -calibrate {} 0can be used;-directto disable "compilation" outside of measure cycle, and will be executed byTclEvalObjExinsteadTclNRExecuteByteCode);Normally it uses compiled version to measure (as it would be a part of compiled script or procedure body):
-overheadan external calculated overhead can be specified for thetimeratecommand to measure execution of the part of script. Following example shows possibility to ignore overhead of execution of_initprocedure resp. more precise the speed of partstring tolower ...only: