Python Interpreters Benchmarks
x64 ArchLinux : AMD® Ryzen 7 4700U®

 performance measurements

Each table row shows performance measurements for this program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1,000,0003.653.6515,716110  2% 0% 1% 1% 0% 100% 1% 1%

Read the ↓ make, command line, and program output logs to see how this program was run.

Read  benchmark to see what this program should do.

 notes

  source code

import sys


def fib(n):
    a, b = 0, 1
    for i in range(n):
        a, b = b, a + b
    return a

print(fib(int(sys.argv[1])))

 make, command-line, and program output logs

 Wed, 28 Sep 2022 09:09:51 GMT

COMMAND LINE:
 /usr/bin/rustpython fibonacci.rustpython-2.rustpython 1000000

(TRUNCATED) PROGRAM OUTPUT:
1953282128707757731632014947596256332443542996591873396953405194571625257887015694766641987634150146128879524335220236084625510912019560233744015438115196636156919962125642894303370113827800638002767411527927466669865578379318822832061271497583230334854893489572599230722912901928209264331627521730861460017912582042699659936020959339202005184862028402447343139811367418720203868480175318538621112878108240617741383293554561687606454065125954718029126547942894036981659206361019359291352135410376799082940320155702716115395031975973247782162957631629653356694777663285062345245593460647575025935813443457816767646258788590113727299073729478511448089572456191503507025589529116868550008802013233458747217794781447546792016090170642585629359747546532757575740077432034913428785189795354304734560307765078938767286539166799232817449361991523768149557632085371047859706188438731530582395627560879063107819004975169594709736713891745704555202135123350794403360712030504144685221041565037321067932275625864751191461141736034968121738023422478608029202109319249649040983239706683247054441763512526732455275419501683845206023007394959854279298297831204382115757645787692495583351402522152720662441809003259380753628491796680952971185071913798336788737704599136393339558142120369902616179721132509184002305532760710431647819097430043464779336328760146999612802392582947155731668894333945542929287187748774789204296166356536610796023919702109728472966709427334586344798048633944635211654971507261342768205479320931750798880101304160279825063541823440345587422367012826663569346112946131231283890600365473276602456931515185001832848315064548002997893598516123707404615822935444070174833951457586954749175026454212636426222472060048855462589961190475892101224280542898621594646662478564373572217775549876087685912030118551635668902010344639983977326638889036507841618070915452529927597352139574154777291460087943143391560604458251078235116627189263792331301464388059787946844487906057678629746098962742666356968247429338674020743655942605794479071193052258931590719386545525880429139747140181849169733838138446154843063123649290835584278078456131936457559117221369463381803116003078962116686528959537784364644023825163624497181973854441495631317140028503389282227413460301809422483721632185471727045281382407842563874736524914111808078386650633994537623920670051339187333107136069698189628284763245423299306272870457991293245741167533902274499963096566680922262516468582544557851349824144127261240158157538180984666671450069888391785518008943701890257219924852087429155602619177522812466062899678716652967848726848490504132849729771268801163997837643428020245225155010224035416988518537501584673881194047619720619603126534496759917893244478170702904446589571950228809157793897642423751814020998999581612314779022957811001686701867386198617971381398546662819695485537407073562286161655394280764184080921204793281668300598450478792940635631809747975515203509468276591874161090763750690276529436756153980326138890194485941004529227541880945735620795421899662963441346396955980991375010053760259440113617219176881147264713549808756023398475901193275473892575308479804907335837236726817033732665046629357765465568695644613723720600727297037475675178160438011413184468787091159497993877778112826432679827905157083417389547113303140937243680388090656659576678707551401874371976882787437146873085035927166554972119678413041265038397356729644107267553486758335040514273824599870741468531789783850252649665632542683350716994019918967611778476502878867933450663917042267377324685763362119097117544591621973544061280999416255937684347888783565752777401972791851399383065900018304033370131936894596722887286073304345913658301133823320413075361823445008766145707252376869457962973646841107629728977320278508282819550754463084684847561438117573695014515061356879019554017004594786112602714165855107108834583252908251244110558337589786370474805986045347251500257620959108413730211327408446202268366321335377576637894631388327469117232059029540024956318046396290428251186182306963160641380576856666988717582573318377262686670035226467545345109867017615892072456468146637904048253978140892591317589249664687348670563188319381754582592871196904229602059312226131283230839738032069747578232692605308980311770033917562283307963602287807482899093644968407916560752112418512135701149410631460405738804169475671002231646090053711470210784382439011983517900139825749029644505028152512725089213024086252269303816862027341471821615654512373706434911343088388985022963817317575314650410638386173372984318819533933533642298635991688903620411786854382679871298668305262112391387872571180835432013208128346286045618890089960185768106776406004120689222873305000726870381201762912262517414860220909158701927854118500711011094807303215627050927515638394976482611757971916206009351595441212938912242384383652138590707693874781859864896141013246370067545771997078180240193805176334368081665639037830100557360650640241158370308336752160254803292085612867732313373362379424922294864676925567558251008254273169779639917302332096986653591184361218099298416546162123145604470470985197048898219575412240848443043149194702091429384884700501409135147716375046503987936513912232297535667968868660730993644871001182702434670151529391444331308252502713127396984416680670317092936754370540350299990607478106771793012391638018034798194085592402311849488127680371405162433411926178141979603021186895512327740124378547066213324583016607503798862163692656132680292115654479573005858991240890398707367868160247433690154827850868869400057220682616450021098959890770030609041005062058815019699745916836280823110861852942970061608210328075891407632398976037049089758364621611794295586855678965506040503320129464965916297209893507248742658354718355489383436238268302726139145980468344782057874531778483300293761830902892062733581927636335300096094433420601331879098335472391194147544124773291564614856084243951260050796050097638400697364239912487922498550165073697059669962073746916272301140785251213413640426436120545921748182265977547588787157644997388904522719953056708841343934164045926476547137741046732575851155535160704798957047005103194770481118528369985948356317514237815195793935902146476922976930534299571204620994853553580917819231984626859763926664234813419244308825233634521519689643325451204143353164193407923285623499294739875720737058242605693582622260477031568525856021988142708124779867508941030548033778738122257079042153155708562448355644289391526762729234390208715007159956452814650354115944768979626091086849030604686704741535959175352644995059239197150065731515213694220428340424197603380521272939051334630743096406920493778259795422229282204695326737334163366685888464570799663958425502076102393311198140557172683334954852962678694901760541301175084700900975086727859684343829763182023192441879945452213400986220010413697021434633428300173748026660536162405420766907387041723004780874591443000841637439745662790079580759926454338713839454363440083434648264172074352660422841098563618102023267765148394789420336596136927452074205760207344974764497601729437196756021653678947387218277722167506326113360487919296357509078968390509625683302922884005631642169135352972646413604206390452757832741107195981321620642203958822648695176383223532923480116108813112611062712676850350872838547640266609344329693480998967166783675952437452144198444817581720234920825506779148920751583687515719259611243729831470564983623102485228781928699596759469982012918581221889338414080525465572215516207420065649486617076810634032855208096273699560486747741686383616055265184028191426663320701778441023236644926020816372328993276884908689708745590124705036671019180162528581331286559739840814696722557832223722100836982372481080170150255241465912388878271927101524149423814209733618378016061552707989975524225387782357483863372238967512610048197950365639000196692122529882505370746357772140996334524930690279714263735572978669610318192406492901487985982369825121094124360497742408131191974714682008997204478466235448309807291972713424835974200014121079051227260754579356974711936974002570263964485288664689766846904772208537379535048417032773581424221560802495159202532811748368129100577167287182340420093227989220315429335466576398667888423664025346047808137725328967994156608912606616066505967676968980942286141471995146085301233519701760857174560302179393547749667790943145537582633324079471297896372628469685686781278536744445858292865049283130332827386959748429639888729169801063553594838418070952685427728295165292536436648908500618932909022707093200767279713139711851617254365329184453859429301295075767826517033138101386446189895026379294335066910534338127550518447184827233921808819447915057689806745551318178144274730952517167571223487331239812619234854524211751308315920082700622157663791342436156534323493361745812383407932042477523783942125347437258385441786002659977901639044655514236480985353677785675810877410247810113115884575316520705828484062218494024990149498817474834715600879320300791264619947453840159845838648075556397967566496569856568834842829161249518549283584492818732751493831823497237572544557281405380369061231405682554280328754643240279414661288964239540713259454001603392204878267427931450874814718846465531744524045529373059487876236297730199722531976073465608703647770223950682371919095172261075623057520126031437682192624274375675764891540662426766549611865368305788363712155244270811247389349779758150086874185839823464690194915450483873957963769895845747820922420250565092334609733695528058863666543212607314699731589623383441713671422647879757597477833757128491593314059982959055360542779490742479580759782570894285716200197582994627380409303181120758171232576286855265067441056717250545158769185580524757235475016068893932435669676538981127174473915230240962742599294475414763579332027576781734302384303908154711419918307768598707540837321416147078799780378515617613754003137790623042529689591708240181951597772911158160078379969257136851268750075969005202305674157129447149999201379930150512317618687434715223408404607029553295005849120491139554847224244617803871998814109852189941487259979035005338078157515671262524359108713850444072867276714611356528458063837332068
encodings initialization failed. Only utf-8 encoding will be supported.
ModuleNotFoundError: No module named 'encodings'

The above exception was the direct cause of the following exception:

RuntimeError: Could not import encodings. Is your RUSTPYTHONPATH set? If you don't have access to a consistent external environment (e.g. if you're embedding rustpython in another application), try enabling the freeze-stdlib feature

Revised BSD license

  Home   Conclusions   License   Play