All pastes #814414 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-12-13 08:04 UTC
rendered paste body
 REQUIRE ?DEFINED     devel\~moleg\lib\util\ifdef.f
 REQUIRE own          devel\~moleg\lib\util\priority.f
 REQUIRE FOR          devel\~mOleg\lib\util\for-next.f

console.f

screen# * DUP ALLOCATE THROW VALUE frame VALUE frame#

frame frame# CHAR . FILL

 REQUIRE PrintС devel\~pi\lib\console.f

 REQUIRE ResetProfiles  devel\~pinka\lib\Tools\profiler.f

\ : .... frame frame# TYPE ;
\ : .... [ screen# * ] LITERAL FOR [CHAR] . EMIT TILL ;
\ : .... [ screen# ] LITERAL LITERAL FOR frame OVER TYPE TILL DROP ;
\ : .... frame frame# 0 0 PrintС ;
\ : .... [ screen# ] LITERAL LITERAL FOR frame OVER 0 0 PrintС TILL DROP ;
: .... 0 0 setxy frame frame# TYPE ;

: test ( --> )
       realtime own 0= THROW \ не могу установить приоритет
       ResetProfiles
        100 FOR .... TILL
       0 0 setxy
       .AllStatistic
       .AllStatistic_o
       normal own DROP
       ;

\ test

\EOF
     Calls │     Ticks        │  AverageTicks  │
───────────┼──────────────────┼────────────────┤
1      100 │   40,321,155,844 │    403,211,558 │
2      100 │   58,294,241,284 │    582,942,412 │
3      100 │   40,756,840,556 │    407,568,405 │
4      100 │      689,286,976 │      6,892,869 │
5      100 │    1,148,443,788 │     11,484,437 │
6      100 │    2,354,529,070 │     23,545,290 │