grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026+ ¬Œh�áöÏ1ãóô€Rt^RIt^RIt^RIt^RIt.ROtRtRt^t]Pt ] t Rt Rt!RR4tRR] ]R3R ltRR] ]]R3R ltRR R/R llt]R 8Xd]P(!]!44R#R#)a8Tool for measuring execution time of small code snippets. This module avoids a number of common traps for measuring execution times. See also Tim Peters' introduction to the Algorithms chapter in the Python Cookbook, published by O'Reilly. Library usage: see the Timer class. Command line usage: python timeit.py [-n N] [-r N] [-s S] [-p] [-h] [--] [statement] Options: -n/--number N: how many times to execute 'statement' (default: see below) -r/--repeat N: how many times to repeat the timer (default 5) -s/--setup S: statement to be executed once initially (default 'pass'). Execution time of this setup statement is NOT timed. -p/--process: use time.process_time() (default is time.perf_counter()) -v/--verbose: print raw timing results; repeat for more digits precision -u/--unit: set the output time unit (nsec, usec, msec, or sec) -h/--help: print this usage message and exit --: separate options from statement, use when statement starts with - statement: statement to be timed (default 'pass') A multi-line statement may be given by specifying each line as a separate argument; indented lines are possible by enclosing an argument in quotes and using leading spaces. Multiple -s options are treated similarly. If -n is not given, a suitable number of loops is calculated by trying increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the total time is at least 0.2 seconds. Note: there is a certain baseline overhead associated with executing a pass statement. It differs between versions. The code here doesn't try to hide it, but you should be aware of it. The baseline overhead can be measured by invoking the program without arguments. Classes: Timer Functions: timeit(string, string) -> float repeat(string, string) -> list default_timer() -> float NÚTimerz i@Bz• def inner(_it, _timer{init}): {setup} _t0 = _timer() for _i in _it: {stmt} pass _t1 = _timer() return _t1 - _t0 cóB€VPRRRV,,4#)z*Helper to reindent a multi-line statement.Ú Ú )Úreplace)ÚsrcÚindents&&Ú-/opt/alt/python314/lib64/python3.14/timeit.pyÚreindentr Ns€à �;‰;�t˜T C¨&¥LÕ0Ó 1Ð1ócóda€]tRt^StoRtRR]R3RltR Rlt]3Rlt ] ]3Rlt R Rlt R t VtR#) ra˜Class for timing execution speed of small code snippets. The constructor takes a statement to be timed, an additional statement used for setup, and a timer function. Both statements default to 'pass'; the timer function is platform-dependent (see module doc string). If 'globals' is specified, the code will be executed within that namespace (as opposed to inside timeit's namespace). To measure the execution time of the first statement, use the timeit() method. The repeat() method is a convenience to call timeit() multiple times and return a list of results. The statements may contain newlines, as long as they don't contain multi-line string literals. ÚpassNc ól€W0n/pVf \4MTpRp\V\4'd(\ V\ R4VR,p\ V^4pM.\V4'dW%R&VR, pRpRpM \R4h\V\4'd%\ W�,\ R4\ V^4pM,\V4'dWR &VR , pR pM \R 4h\PWVR 7p W�n \ V \ R4p \W¦V4VR,Vn R#)z#Constructor. See class doc string.NÚÚexecrÚ_setupz, _setup=_setupz_setup()z&setup is neither a string nor callableÚ_stmtz , _stmt=_stmtz_stmt()z%stmt is neither a string nor callable)ÚstmtÚsetupÚinitÚinner)ÚtimerÚ_globalsÚ isinstanceÚstrÚcompileÚdummy_src_namer ÚcallableÚ ValueErrorÚtemplateÚformatrrr) ÚselfrrrÚglobalsÚlocal_nsÚ global_nsrÚ stmtprefixrÚcodes &&&&& r Ú__init__ÚTimer.__init__es€ðŒ ؈Ø")¢/”H”J°wˆ ØˆÜ �eœS× !Ò !ä �Eœ>¨6Ô 2Ø �ˆJܘU AÓ&‰EÜ �e�_Š_Ø!&�XÑ Ø Ð%Õ %ˆD؈J؉EäÐEÓFÐ FÜ �dœC× Ò ä �JÕ%¤~°vÔ >ܘD !Ó$‰DÜ �d�^Š^Ø $�WÑ Ø �OÕ #ˆD؉DäÐDÓEÐ EÜ�o‰o 4¸4ˆoÓ@ˆØŒÜ�sœN¨FÓ3ˆÜ ˆT˜hÔ'ؘgÕ&ˆŽ r c óä€^RIp^RIpVPeH\VP4RVPP R4\ 3VP \ &VPVR7R#)a‘Helper to print a traceback from the timed code. Typical use: t = Timer(...) # outside the try/except try: t.timeit(...) # or t.repeat(...) except: t.print_exc() The advantage over the standard traceback is that source lines in the compiled template will be displayed. The optional file argument directs where the traceback is sent; it defaults to sys.stderr. Nr©Úfile)Ú linecacheÚ tracebackrÚlenÚsplitrÚcacheÚ print_exc)r!r+r,r-s&& r r1ÚTimer.print_excˆsU€÷" $Ø �8‰8Ò Ü/2°4·8±8«}Ø/3Ø/3¯x©x¯~©~¸dÓ/CÜ/=ð/?ˆI�O‰OœNÑ +ð ×Ñ ÐÖ&r c ó@€\P!RV4p\P!4p\P!4VP W P 4pV'd\P!4V# T'd\P!4ii;i)a¦Time 'number' executions of the main statement. To be precise, this executes the setup statement once, and then returns the time it takes to execute the main statement a number of times, as float seconds if using the default timer. The argument is the number of times through the loop, defaulting to one million. The main statement, the setup statement and the timer function to be used are passed to the constructor. N)Ú itertoolsÚrepeatÚgcÚ isenabledÚdisablerrÚenable)r!ÚnumberÚitÚgcoldÚtimings&& r ÚtimeitÚ Timer.timeit£sg€ô× Ò ˜d FÓ +ˆÜ— ’ “ˆÜ � Š Œ ð Ø—Z‘Z §J¡JÓ/ˆFçÜ— ’ ” ؈ ø÷Ü— ’ • ðús ÁA=Á= Bc ór€.p\V4F%pVPV4pVPV4K' V#)ahCall timeit() a few times. This is a convenience function that calls the timeit() repeatedly, returning a list of results. The first argument specifies how many times to call timeit(), defaulting to 5; the second argument specifies the timer argument, defaulting to one million. Note: it's tempting to calculate mean and standard deviation from the result vector and report these. However, this is not very useful. In a typical case, the lowest value gives a lower bound for how fast your machine can run the given code snippet; higher values in the result vector are typically not caused by variability in Python's speed, but by other processes interfering with your timing accuracy. So the min() of the result is probably the only number you should be interested in. After that, you should look at the entire vector and apply common sense rather than statistics. )Úranger>Úappend)r!r5r:ÚrÚiÚts&&& r r5Ú Timer.repeat·s7€ð( ˆÜ�v–ˆAØ— ‘ ˜FÓ#ˆAØ �H‰H�QŽKñðˆr c óš€^pRF8pW#,pVPV4pV'd V!WE4VR8¼gK5WE3u# V^ ,pKJ)aoReturn the number of loops and time taken so that total time >= 0.2. Calls the timeit method with increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the time taken is at least 0.2 second. Returns (number, time_taken). If *callback* is given and is not None, it will be called after each trial with two arguments: ``callback(number, time_taken)``. gš™™™™™É?)ééé)r>)r!ÚcallbackrDÚjr:Ú time_takens&& r Ú autorangeÚTimer.autorangeÑsR€ð ˆØÛ�Ø��Ø!Ÿ[™[¨Ó0� ßÙ˜VÔ0Ø Ö$Ø"Ð/Ò/ñ ð ��GŠAr )rrr©N)Ú__name__Ú __module__Ú __qualname__Ú__firstlineno__Ú__doc__Ú default_timerr'r1Údefault_numberr>Údefault_repeatr5rNÚ__static_attributes__Ú__classdictcell__)Ú __classdict__s@r rrSsAø‡€ñð"#¨&¸ Øô!'ôF'ð6+ôð(+°>ô÷4òr r có8€\WW$4PV4#)zCConvenience function to create Timer object and call timeit method.)rr>)rrrr:r"s&&&&&r r>r>çs€ô �˜eÓ -× 4Ñ 4°VÓ <ÐÚusecg�íµ ÷ư>Úmsecgü©ñÒMbP?Úsecgð?z:Unrecognized unit. Please select nsec, usec, msec, or sec.r*r)Úendc ód<€RpV^8gp\TPY'dRMRVSR74R#)z${num} loop{s} -> {secs:.{prec}g} secÚsr)ÚnumrfÚsecsÚprecN)Úprintr )r:rMÚmsgÚpluralÚ precisions&& €r rKÚmain..callbackAs8ø€Ø<�Ø  A™+�Ü�c—j‘j V¶f©sÀ"Ø&0°yð!óBöCr cóè<€SpVe SV,pMISP4UUu.uFwrW!3NK pppVPRR7VF wr!W8¼gK M RSVX, X3,#uuppi)NT)Úreversez%.*g %s)ÚitemsÚsort)ÚdtÚunitÚscaleÚscalesrmÚ time_unitÚunitss& €€€r Ú format_timeÚmain..format_timeUsuø€Øˆà Ò Ø˜$•K‰Eà7<·{±{´}ÔE±}© ¨�u“m±}ˆFÑEØ �K‰K ˆKÔ %Û%‘ �Ø–;Ùñ &ð˜I r¨E¥z°4Ð8Õ8Ð8ùó Fs¥A.z raw times: %sz, z"%d loop%s, best of %d: %s per looprfz8The test results are likely unreliable. The worst time (z6) was more than four times slower than the best time (z).)znumber=zsetup=zrepeat=ÚprocessÚverbosezunit=Úhelp)z-nz--number)z-sz--setup)z-uz--unit)z-rz--repeat)z-pz --process)z-vz --verbose)z-hz--help)ÚsysÚargvÚgetoptÚerrorrjrVÚjoinrXÚintrBÚstderrÚtimeÚ process_timerUÚosÚpathÚinsertÚcurdirrrNr1r5ÚmapÚminÚmaxÚwarningsÚ warn_explicitÚ UserWarning)Úargsr^r€ÚoptsÚerrrrr:rr5r|ÚoÚar‡rErKÚ_Ú raw_timingsryrsÚtimingsÚbestÚworstrŽrmrwrxs&$ @@@r Úmainr›ósú€ð" ‚|Ü�x‰x˜�|ˆÛðØ—]‘] 4¨ò$KóL‰ ˆô €EØ �9‰9�T‹?× $Ð $˜f€DØ €FØ €EÜ €FØ€GØ€IØ �T˜6 4¨°°u¸cÐ B€EØ€IÛ‰ˆØ Ð"Ô "ܘ“VˆFØ Ð!Ô !Ø �L‰L˜ŒOØ Ð Ô Ø�EŒzØ‘ äÐRÜŸ:™:õ'âØ Ð"Ô "ܘ“VˆFؘŒ{Ø�Ø Ð#Ô #Ü×%Ñ%ˆEØ Ð#Ô #ߨ˜Q•� Ø �q�LˆGØ Ð Ö Ü ”'˜rÕ "Úñ1ð2 �I‰I�eÓ × &Ð & €Eó ܇H�H‡O�O�A�r—y‘yÔ!ØÒÙ˜EÓ"ˆä ˆd˜5Ó!€AØ �„{àˆß õ Cð  ØŸ ™  HÓ-‰IˆF�A÷ Ü ŒGðØ—h‘h˜vÓ.ˆ ÷ 9÷Ü ˆo § ¡ ¬#¨k¸;Ó*GÓ HÕHÔIÜ ŒÙ%0Ó1¡[˜rˆr�F�{ˆ{¡[€GÐ1ä ˆw‹<€DÜ Ð .Ø  aœK‘S¨RØ ‘[ Ó&ð (õ (ô)ô ˆw‹<€DÜ �‹L€EØ ��q•ÔÛØ×Òñ#.¨eÖ"4±kÀ$Ö6Gð Iô +¨B°ô  3ñ øðW �<‰<ôÜ ˆcŒ Ü Ð3Ô4Ýûðûðz Ø �K‰KŒMÚûðØ � ‰ Œ Úüò&2s5¤KÇLÇ(L)ÉMËLË-L Ì LÌL&Ì)L>Ú__main__)rr>r5rVrP)rUr6r4r~r…Ú__all__rrWrXÚ perf_counterrVr"rrr rr>r5r›rQÚexit©r r Úr¡s«ðñ.ó` ÛÛ Û â 8€à€Ø€Ø€Ø×!Ñ!€ à €ð €ò2÷ QñQðh˜f¨MØ ¨$ô=ð ˜f¨MØ ¨ÀôEñ C 4õCðL ˆzÔØ‡H‚H‰T‹VÖñr