I am fundamentally a Python developer, a fact which makes me skip a bunch of C knowledge. I made the choice to stop placing all my focus on system performance to learn in writing and learning velocity. This will be the first of many blog posts that will focus on a variety of programming aspects. I’ll start things off by diving into python. Let's go back to 10 years ago, when I was launching my 1st Python interpreter and typing:
. As a sysadmin, I didn't take a lot of time before I create my first scripts, then applications. Web page scrapping, mailing, ncurses menus. Basically the knight became blacksmith and now is able to create his own swords. To share my armory, I quickly decided to learn the well-known web framework Django and seeing the learning curve and the quick results I was getting, I apparently made good choices.
If you use the snake language or not, you inevitably heard its main problem: Due to facts it's not a compiled language, Python cannot reach the performances of the fastest languages such as C/C++. This assumption is partially true and as a performance benchmarker I always thought that despite the slower performance, I'm able to create anything I need with Python, so the trade off was worth it. At least until I tried to write a benchmark tool out of Python with a very small amount of overhead. This did not turn out exactly as I had expected.
The purpose of this kind of program is in total contradiction with the average web developers behaviors (cf I cache everything). The idea here is generally to produce an accurate action somewhere on a system
and Python by nature didn't seem adapted to that. This is a second sentence not entirely true, there are bunch of ways to write and use C code in Python such as Cython, pyrex or C wrappers. The standard library itself includes more and more C code, and even third library alternatives come to speed-up parts of code.
In facts, most of the general usages already have their C implementation. Network, file I/O, regexp or TLS, the language has boosted a lot of topics. Remain CPU-bound tasks and here, like most of interpreted languages, the GIL will produce some overhead. But keep in mind that this impacts just multi-tasks application, so in few words, single-thread codes are handsomely optimized but multi-thread suffer from the language design.
By its various qualities, Python has become one the favorite language for scientific computing. We can mention NumPy, the basis about science, or Anaconda the scientific Python distribution and its package manager conda. The ecosystem is really large, touching many purposes:
It has a simple usage and let people produce quickly results but scientists generally have another main requirement: High computing capacity. Tons of numbers with tons of applied functions, sometimes with tons of dimensions. Scaling generally answers to this issue, but let's avoid the multi-task subject and focus on single-thread performance. Of course parallelism is part of the reality landscape but it requires some technics such as sharding or parallel computing.
To collect performance data, we created a simple tool named
. It aims to launch different kind of operations across several Python ways. For instance, compute an average from CPython or third libraries. This project is free, so feel free to contribute,. It also will be the subject of another article.
Below you'll find some charts and tables representing timing of math functions. We observe performances from Vanilla Python to Numpy passing by alternative builtins ways such as SQLite. Our test environment is the following:
You can swipe to get more results.
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Average"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":400,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.avg.numpy","name":"fpb.avg.numpy","color":"#1c7668","data":[[100,0.015043020248413086],[500,0.012878312004937068],[1000,0.01695851484934489],[5000,0.01692904366387261],[10000,0.022825996081034344],[50000,0.04110827590479996],[100000,0.08203824361165366],[500000,0.25993115974195075],[1000000,0.50067196721616]],"type":"spline"},{"id":"range-fpb.avg.numpy","name":"fpb.avg.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.008137669166766344,0.021948371330059828],[500,0.007206356507711103,0.018550267502163032],[1000,0.010086580931101378,0.023830448767588403],[5000,0.010748835998275082,0.02310925132947014],[10000,0.015480498892584666,0.03017149326948402],[50000,0.037151538544963926,0.04506501326463599],[100000,0.07121349351034587,0.09286299371296144],[500000,0.22340020472158215,0.2964621147623194],[1000000,0.449755021530839,0.551588912901481]],"type":"areasplinerange","linkedTo":"line-fpb.avg.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.avg.sqlite","name":"fpb.avg.sqlite","color":"#742b4f","data":[[100,0.029518869188096788],[500,0.05559126536051433],[1000,0.08827315436469185],[5000,0.3919204076131185],[10000,0.6226274702284071],[50000,3.151973088582357],[100000,5.763209660847982],[500000,29.889027277628582],[1000000,60.05869309107462]],"type":"spline"},{"id":"range-fpb.avg.sqlite","name":"fpb.avg.sqlite deviation","lineWidth":0,"color":"#742b4f","fillOpacity":0.3,"data":[[100,0.027215903190312165,0.031821835185881414],[500,0.0553131103515625,0.055869420369466155],[1000,0.07980831026269211,0.0967379984666916],[5000,0.3866354624430339,0.3972053527832032],[10000,0.5767560553498834,0.6684988851069309],[50000,3.151973088582357,3.151973088582357],[100000,5.600750367121212,5.9256689545747525],[500000,29.889027277628582,29.889027277628582],[1000000,58.98645689907063,61.130929283078615]],"type":"areasplinerange","linkedTo":"line-fpb.avg.sqlite","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.avg.python","name":"fpb.avg.python","color":"#76869b","data":[[100,0.0015097856521606445],[500,0.003387928009033203],[1000,0.006088415781656901],[5000,0.026279555426703557],[10000,0.05061209201812744],[50000,0.24541276873964255],[100000,0.4979991912841797],[500000,2.6619636651241416],[1000000,5.622205388718757]],"type":"spline"},{"id":"range-fpb.avg.python","name":"fpb.avg.python deviation","lineWidth":0,"color":"#76869b","fillOpacity":0.3,"data":[[100,0.0010401105064772552,0.0019794607978440336],[500,0.0028748227260243227,0.0039010332920420836],[1000,0.005582745394326547,0.0065940861689872555],[5000,0.025381268959617623,0.02717784189378949],[10000,0.04959445750757672,0.051629726528678165],[50000,0.23138643045968302,0.25943910701960204],[100000,0.4552372027320608,0.5407611798362986],[500000,2.3520364035345156,2.9718909267137676],[1000000,5.448697798515003,5.795712978922511]],"type":"areasplinerange","linkedTo":"line-fpb.avg.python","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.avg.pandas","name":"fpb.avg.pandas","color":"#bde47a","data":[[100,1.0043005148569744],[500,1.0149478912353516],[1000,1.016506552696228],[5000,1.0192947917514377],[10000,1.0272314151128132],[50000,1.035440329349402],[100000,1.0863240559895835],[500000,1.2892422531590317],[1000000,1.532826354538185]],"type":"spline"},{"id":"range-fpb.avg.pandas","name":"fpb.avg.pandas deviation","lineWidth":0,"color":"#bde47a","fillOpacity":0.3,"data":[[100,0.9446139038592889,1.0639871258546598],[500,0.9563253180701798,1.0735704644005233],[1000,0.9600841417559347,1.0729289636365213],[5000,0.9501467864515353,1.0884427970513402],[10000,0.9523119507983608,1.1021508794272656],[50000,0.9826409035534387,1.0882397551453655],[100000,1.0296214395222634,1.1430266724569036],[500000,1.249323791571757,1.3291607147463065],[1000000,1.453638091235909,1.612014617840461]],"type":"areasplinerange","linkedTo":"line-fpb.avg.pandas","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"140417476574680"}
|
Numpy |
Pandas |
Python |
SQLite |
100 |
0.015 |
1.004 |
0.002 |
0.030 |
500 |
0.013 |
1.015 |
0.003 |
0.056 |
1000 |
0.017 |
1.017 |
0.006 |
0.088 |
5000 |
0.017 |
1.019 |
0.026 |
0.392 |
10000 |
0.023 |
1.027 |
0.051 |
0.623 |
50000 |
0.041 |
1.035 |
0.245 |
3.152 |
100000 |
0.082 |
1.086 |
0.498 |
5.763 |
500000 |
0.260 |
1.289 |
2.662 |
29.889 |
1000000 |
0.501 |
1.533 |
5.622 |
60.059 |
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Maximum"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":500,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.max.sqlite","name":"fpb.max.sqlite","color":"#742b4f","data":[[100,0.034242206149631076],[500,0.06552537282307944],[1000,0.09117921193440755],[5000,0.4235506057739258],[10000,0.6413714090983074],[50000,3.335714340209961],[100000,6.043806076049805],[500000,31.572898228963215],[1000000,64.82575469546848]],"type":"spline"},{"id":"range-fpb.max.sqlite","name":"fpb.max.sqlite deviation","lineWidth":0,"color":"#742b4f","fillOpacity":0.3,"data":[[100,0.02929323379185504,0.03919117850740711],[500,0.06031990051269531,0.07073084513346356],[1000,0.08394576268266626,0.09841266118614883],[5000,0.41794776916503906,0.4291534423828125],[10000,0.5798844096636149,0.7028584085329999],[50000,3.335714340209961,3.335714340209961],[100000,5.941113380590488,6.146498771509122],[500000,31.572898228963215,31.572898228963215],[1000000,62.719224322844944,66.93228506809201]],"type":"areasplinerange","linkedTo":"line-fpb.max.sqlite","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.max.numpy","name":"fpb.max.numpy","color":"#1c7668","data":[[100,0.005478660265604654],[500,0.004897912343343099],[1000,0.005602836608886719],[5000,0.007025930616590711],[10000,0.009610705905490452],[50000,0.0254379619251598],[100000,0.03530184427897135],[500000,0.18014300953258167],[1000000,0.3128629525502523]],"type":"spline"},{"id":"range-fpb.max.numpy","name":"fpb.max.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.0029107971107784707,0.008046523420430838],[500,0.0034172398322397314,0.006378584854446466],[1000,0.004129865093271292,0.007075808124502146],[5000,0.0058854068724249866,0.008166454360756435],[10000,0.008571703966990842,0.010649707843990063],[50000,0.024030135457162184,0.02684578839315742],[100000,0.02727843030112719,0.04332525825681552],[500000,0.16916727817863503,0.1911187408865283],[1000000,0.24522309383726879,0.3805028112632358]],"type":"areasplinerange","linkedTo":"line-fpb.max.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.max.python","name":"fpb.max.python","color":"#76869b","data":[[100,0.002383987108866374],[500,0.008113384246826172],[1000,0.01630564530690511],[5000,0.07386578453911676],[10000,0.1471530066596137],[50000,0.72937907594623],[100000,1.446378231048584],[500000,7.240483833081794],[1000000,14.694854974746704]],"type":"spline"},{"id":"range-fpb.max.python","name":"fpb.max.python deviation","lineWidth":0,"color":"#76869b","fillOpacity":0.3,"data":[[100,0.001965995421504415,0.002801978796228333],[500,0.007752667042335757,0.008474101451316588],[1000,0.014690361547393272,0.017920929066416947],[5000,0.07221326477740618,0.07551830430082733],[10000,0.14393564759488375,0.15037036572434365],[50000,0.7043732451675647,0.7543849067248952],[100000,1.4033342755435902,1.4894221865535777],[500000,7.180818780024285,7.300148886139303],[1000000,14.494474247287869,14.89523570220554]],"type":"areasplinerange","linkedTo":"line-fpb.max.python","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.max.pandas","name":"fpb.max.pandas","color":"#bde47a","data":[[100,0.23811757564544678],[500,0.2391611205206977],[1000,0.2441573143005371],[5000,0.2660134103563097],[10000,0.28449440002441406],[50000,0.43001521717418323],[100000,0.567169984181722],[500000,3.242673006924716],[1000000,4.484617710113525]],"type":"spline"},{"id":"range-fpb.max.pandas","name":"fpb.max.pandas deviation","lineWidth":0,"color":"#bde47a","fillOpacity":0.3,"data":[[100,0.21747163017637391,0.25876352111451967],[500,0.21935369898026177,0.2589685420611336],[1000,0.2271914337116392,0.26112319488943503],[5000,0.23871539133123681,0.2933114293813826],[10000,0.2612849483246749,0.3077038517241532],[50000,0.408783369996884,0.45124706435148243],[100000,0.5040491644170916,0.6302908039463525],[500000,2.9040719153538057,3.581274098495626],[1000000,3.5092820422502675,5.459953377976784]],"type":"areasplinerange","linkedTo":"line-fpb.max.pandas","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"1399714231450910"}
|
Numpy |
Pandas |
Python |
SQLite |
100 |
0.006 |
0.238 |
0.002 |
0.034 |
500 |
0.005 |
0.239 |
0.008 |
0.066 |
1000 |
0.006 |
0.244 |
0.016 |
0.091 |
5000 |
0.007 |
0.266 |
0.074 |
0.424 |
10000 |
0.010 |
0.284 |
0.147 |
0.641 |
50000 |
0.025 |
0.430 |
0.729 |
3.336 |
100000 |
0.035 |
0.567 |
1.446 |
6.044 |
500000 |
0.180 |
3.243 |
7.240 |
31.573 |
1000000 |
0.313 |
4.485 |
14.695 |
64.826 |
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Sinus"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":500,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.sin.python","name":"fpb.sin.python","color":"#76869b","data":[[100,0.013688802719116211],[500,0.06213612026638455],[1000,0.1212616761525472],[5000,0.5769377284579807],[10000,1.1676642100016277],[50000,6.022576707782167],[100000,13.021847407023111],[500000,66.92134047999527],[1000000,134.2208929667397]],"type":"spline"},{"id":"range-fpb.sin.python","name":"fpb.sin.python deviation","lineWidth":0,"color":"#76869b","fillOpacity":0.3,"data":[[100,0.012764052155922339,0.014613553282310083],[500,0.05830056665875965,0.06597167387400944],[1000,0.11471574723338862,0.12780760507170577],[5000,0.562020617652176,0.5918548392637855],[10000,1.1274947998104776,1.2078336201927777],[50000,5.692966078724962,6.352187336839372],[100000,12.53323647547022,13.510458338576003],[500000,65.29905266057133,68.5436282994192],[1000000,131.1774639814362,137.26432195204322]],"type":"areasplinerange","linkedTo":"line-fpb.sin.python","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sin.pandas","name":"fpb.sin.pandas","color":"#bde47a","data":[[100,0.18417398134867352],[500,0.18661816914876303],[1000,0.20279069741566977],[5000,0.27536312739054364],[10000,0.3486667209201389],[50000,1.092743729100083],[100000,1.0274370511372883],[500000,10.342932614413174],[1000000,16.6393469174703]],"type":"spline"},{"id":"range-fpb.sin.pandas","name":"fpb.sin.pandas deviation","lineWidth":0,"color":"#bde47a","fillOpacity":0.3,"data":[[100,0.1667304697814471,0.20161749291589995],[500,0.17512188878528342,0.19811444951224264],[1000,0.18328141048886554,0.222299984342474],[5000,0.2670404266606284,0.2836858281204589],[10000,0.3042677963832269,0.3930656454570509],[50000,0.9536627190219163,1.2318247391782498],[100000,0.9903796238279523,1.0644944784466244],[500000,8.524370989412047,12.161494239414301],[1000000,11.15347889162545,22.125214943315147]],"type":"areasplinerange","linkedTo":"line-fpb.sin.pandas","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sin.numpy","name":"fpb.sin.numpy","color":"#1c7668","data":[[100,0.0034034252166748047],[500,0.010360611809624566],[1000,0.017958084742228188],[5000,0.0870929823981391],[10000,0.15482393900553384],[50000,0.9987854235100023],[100000,0.8127768834431967],[500000,10.135372624252781],[1000000,16.54103506179083]],"type":"spline"},{"id":"range-fpb.sin.numpy","name":"fpb.sin.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.003047129897223611,0.0037597205361259984],[500,0.00913400057529428,0.01158722304395485],[1000,0.013689892151862096,0.02222627733259428],[5000,0.06763357678515872,0.10655238801111949],[10000,0.1055936589620469,0.2040542190490208],[50000,0.8097801070072574,1.1877907400127472],[100000,0.8012040167977726,0.8243497500886207],[500000,8.214847171023687,12.055898077481876],[1000000,11.257488843287438,21.82458128029422]],"type":"areasplinerange","linkedTo":"line-fpb.sin.numpy","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"1399714231450919"}
|
Numpy |
Pandas |
Python |
SQLite |
100 |
0.003 |
0.184 |
0.014 |
|
500 |
0.010 |
0.187 |
0.062 |
|
1000 |
0.018 |
0.203 |
0.121 |
|
5000 |
0.087 |
0.275 |
0.577 |
|
10000 |
0.158 |
0.349 |
1.168 |
|
50000 |
0.999 |
1.093 |
6.023 |
|
100000 |
0.813 |
1.027 |
13.022 |
|
500000 |
10.135 |
10.343 |
66.921 |
|
1000000 |
16.541 |
16.639 |
134.221 |
|
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Sum"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":500,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.sum.numpy","name":"fpb.sum.numpy","color":"#1c7668","data":[[100,0.010020136833190918],[500,0.008868111504448785],[1000,0.010989705721537272],[5000,0.01457267337375217],[10000,0.026676389906141493],[50000,0.050360361735026046],[100000,0.40508270263671875],[500000,0.40320251927231304],[1000000,1.452240262712751]],"type":"spline"},{"id":"range-fpb.sum.numpy","name":"fpb.sum.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.00438440994876917,0.015655863717612666],[500,0.004101808019230319,0.01363441498966725],[1000,0.005997785383294387,0.015981626059780155],[5000,0.005475058142081263,0.023670288605423077],[10000,0.00714080160903121,0.04621197820325178],[50000,-0.0013704102118419215,0.10209113368189401],[100000,0.39730353733639595,0.41286186793704155],[500000,-0.10867355418084051,0.9150785927254665],[1000000,-0.10297584147992511,3.0074563669054273]],"type":"areasplinerange","linkedTo":"line-fpb.sum.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum.sqlite","name":"fpb.sum.sqlite","color":"#742b4f","data":[[100,0.028504265679253474],[500,0.05650520324707031],[1000,0.08675522274441189],[5000,0.3881057103474935],[10000,0.5982335408528645],[50000,3.063360850016276],[100000,5.773735046386719],[500000,30.43206532796224],[1000000,59.20866065555148]],"type":"spline"},{"id":"range-fpb.sum.sqlite","name":"fpb.sum.sqlite deviation","lineWidth":0,"color":"#742b4f","fillOpacity":0.3,"data":[[100,0.025519164260160897,0.03148936709834605],[500,0.0538031260172526,0.05920728047688802],[1000,0.08099194493707133,0.09251850055175244],[5000,0.3775755564371745,0.39863586425781256],[10000,0.550822524267174,0.645644557438555],[50000,3.063360850016276,3.063360850016276],[100000,5.544961625185391,6.002508467588046],[500000,30.43206532796224,30.43206532796224],[1000000,57.94010828985848,60.47721302124449]],"type":"areasplinerange","linkedTo":"line-fpb.sum.sqlite","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum.python","name":"fpb.sum.python","color":"#76869b","data":[[100,0.0014422337214152017],[500,0.003296534220377604],[1000,0.006319880485534668],[5000,0.02572562959459093],[10000,0.05044718583424886],[50000,0.24580117427941525],[100000,0.501569112141927],[500000,2.595018907026811],[1000000,5.581529329693507]],"type":"spline"},{"id":"range-fpb.sum.python","name":"fpb.sum.python deviation","lineWidth":0,"color":"#76869b","fillOpacity":0.3,"data":[[100,0.0010142714956611907,0.0018701959471692127],[500,0.0029115879450222325,0.0036814804957329755],[1000,0.005409601203094366,0.00723015976797497],[5000,0.025046408011142655,0.0264048511780392],[10000,0.04900258052405408,0.051891791144443644],[50000,0.22488205552197368,0.26672029303685685],[100000,0.4602056014325385,0.5429326228513155],[500000,2.4140430236138104,2.7759947904398117],[1000000,5.389317478897469,5.773741180489544]],"type":"areasplinerange","linkedTo":"line-fpb.sum.python","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum.pandas","name":"fpb.sum.pandas","color":"#bde47a","data":[[100,0.2631789445877075],[500,0.27043130662706166],[1000,0.27040640513102215],[5000,0.2932877010769314],[10000,0.30671458774142796],[50000,0.46307881673177087],[100000,0.6195640563964844],[500000,3.354452306574041],[1000000,4.825029524545821]],"type":"spline"},{"id":"range-fpb.sum.pandas","name":"fpb.sum.pandas deviation","lineWidth":0,"color":"#bde47a","fillOpacity":0.3,"data":[[100,0.24899602729287873,0.2773618618825363],[500,0.24875635765218665,0.2921062556019367],[1000,0.25433881521888996,0.28647399504315435],[5000,0.27362772963833387,0.31294767251552896],[10000,0.29462617152925114,0.3188030039536048],[50000,0.44779561591520795,0.4783620175483338],[100000,0.5769254344873957,0.662202678305573],[500000,3.0158063129935475,3.6930983001545346],[1000000,3.853739575150498,5.796319473941144]],"type":"areasplinerange","linkedTo":"line-fpb.sum.pandas","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"139971423450952"}
|
Numpy |
Pandas |
Python |
SQLite |
100 |
0.010 |
0.263 |
0.001 |
0.029 |
500 |
0.009 |
0.270 |
0.003 |
0.057 |
1000 |
0.011 |
0.270 |
0.006 |
0.087 |
5000 |
0.015 |
0.293 |
0.026 |
0.388 |
10000 |
0.027 |
0.307 |
0.050 |
0.598 |
50000 |
0.050 |
0.463 |
0.246 |
3.063 |
100000 |
0.405 |
0.620 |
0.502 |
5.774 |
500000 |
0.403 |
3.354 |
2.595 |
30.432 |
1000000 |
1.452 |
4.825 |
5.582 |
59.209 |
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Sum 2D"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":2000,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.sum2d.numpy","name":"fpb.sum2d.numpy","color":"#1c7668","data":[[100,0.07962385813395183],[500,0.31534830729166663],[1000,0.6102508968777126],[5000,3.0378500620524087],[10000,5.898637771606445],[50000,29.40026919047038],[100000,58.727664947509766],[500000,294.6461041768392],[1000000,585.7833915286594]],"type":"spline"},{"id":"range-fpb.sum2d.numpy","name":"fpb.sum2d.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.07390818280883991,0.08533953345906374],[500,0.3135204315185547,0.31717618306477857],[1000,0.6008196204622464,0.6196821732931789],[5000,3.0309359232584634,3.044764200846354],[10000,5.828538592452974,5.968736950759917],[50000,29.40026919047038,29.40026919047038],[100000,58.35772586315737,59.09760403186216],[500000,294.6461041768392,294.6461041768392],[1000000,583.0000899086199,588.566693148699]],"type":"areasplinerange","linkedTo":"line-fpb.sum2d.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum2d.pandas","name":"fpb.sum2d.pandas","color":"#bde47a","data":[[100,0.3412167231241862],[500,0.5926291147867838],[1000,0.6730132632785373],[5000,2.55584716796875],[10000,3.8752619425455728],[50000,23.922284444173176],[100000,50.50663153330485],[500000,268.88473828633624],[1000000,509.2643870247735]],"type":"spline"},{"id":"range-fpb.sum2d.pandas","name":"fpb.sum2d.pandas deviation","lineWidth":0,"color":"#bde47a","fillOpacity":0.3,"data":[[100,0.299075643694115,0.38335780255425744],[500,0.5835692087809244,0.6016890207926432],[1000,0.593951227136172,0.7520752994209026],[5000,2.4433135986328125,2.6683807373046875],[10000,3.230418376344813,4.520105508746333],[50000,23.922284444173176,23.922284444173176],[100000,49.356372495394744,51.65689057121495],[500000,268.88473828633624,268.88473828633624],[1000000,499.24788938469493,519.280884664852]],"type":"areasplinerange","linkedTo":"line-fpb.sum2d.pandas","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum2d.sqlite","name":"fpb.sum2d.sqlite","color":"#742b4f","data":[[100,0.037897957695855036],[500,0.08638699849446614],[1000,0.14886591169569227],[5000,0.6698369979858398],[10000,1.1388270060221353],[50000,5.817651748657227],[100000,11.122735341389973],[500000,57.66852696736654],[1000000,116.21907552083333]],"type":"spline"},{"id":"range-fpb.sum2d.sqlite","name":"fpb.sum2d.sqlite deviation","lineWidth":0,"color":"#742b4f","fillOpacity":0.3,"data":[[100,0.03669939501680351,0.03909652037490656],[500,0.08543332417805989,0.08734067281087239],[1000,0.13615393885161264,0.1615778845397719],[5000,0.6621678670247396,0.6775061289469401],[10000,1.082812213151981,1.1948417988922895],[50000,5.817651748657227,5.817651748657227],[100000,10.80951566250211,11.435955020277836],[500000,57.66852696736654,57.66852696736654],[1000000,114.099814235058,118.33833680660865]],"type":"areasplinerange","linkedTo":"line-fpb.sum2d.sqlite","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum2d.python","name":"fpb.sum2d.python","color":"#76869b","data":[[100,0.07187525431315105],[500,0.3225008646647135],[1000,0.5467388365003797],[5000,3.0083656311035156],[10000,6.068522135416666],[50000,28.635819753011067],[100000,61.103102366129555],[500000,374.35197830200195],[1000000,590.1536570654974]],"type":"spline"},{"id":"range-fpb.sum2d.python","name":"fpb.sum2d.python deviation","lineWidth":0,"color":"#76869b","fillOpacity":0.3,"data":[[100,0.07080593819989814,0.07294457042640395],[500,0.3213882446289062,0.3236134847005208],[1000,0.4901915455132462,0.6032861274875132],[5000,2.9348532358805337,3.0818780263264975],[10000,5.926135134612184,6.210909136221148],[50000,28.635819753011067,28.635819753011067],[100000,53.5501697919581,68.65603494030101],[500000,374.35197830200195,374.35197830200195],[1000000,552.3817282307446,627.9255859002503]],"type":"areasplinerange","linkedTo":"line-fpb.sum2d.python","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"1399714231450123"}
|
Numpy |
Pandas |
Python |
SQLite |
100 |
0.080 |
0.341 |
0.072 |
0.038 |
500 |
0.315 |
0.593 |
0.323 |
0.086 |
1000 |
0.610 |
0.673 |
0.547 |
0.149 |
5000 |
3.038 |
2.556 |
3.008 |
0.670 |
10000 |
5.899 |
3.875 |
6.069 |
1.139 |
50000 |
29.400 |
23.922 |
28.636 |
5.818 |
100000 |
58.728 |
50.507 |
61.103 |
11.123 |
500000 |
294.646 |
268.885 |
374.352 |
57.669 |
1000000 |
585.783 |
509.264 |
590.154 |
116.219 |
In case you didn’t know it, GPUs are optimized for floating point computation and nowadays It's not incredible to see gaming focused PCs used as high performance computers. During the last decade, development for this kind of device has been ease a lot mainly by CUDA: Compute Unified Device Architecture. This technology allows to use GPU for general purpose (GPGPU) with C programming language, and so, the Snake comes again, based on CUDA multiple libraries drew a complete Python ecosystem from statistic to deep learning where most of the topics has been implemented with GPU support.
In the landscape of Python and GPU, you'll find several bricks, such as:
Here's another charts showing GPU solutions' performance. We keep Numpy to have an idea of CPU vs GPU.
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Average"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":400,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.avg.cupy","name":"fpb.avg.cupy","color":"#684158","data":[[100,0.11064476437038845],[500,0.13589859008789062],[1000,0.11109246148003471],[5000,0.1341104507446289],[10000,0.10863675011528862],[50000,0.1399517059326172],[100000,0.11463483174641927],[500000,0.2903143564860026],[1000000,0.6324609120686849],[5000000,4.019869698418511],[10000000,8.08654891120063],[50000000,40.22362497117785],[100000000,78.20110850863985],[500000000,391.0840352376302],[1000000000,782.1911176045736]],"type":"spline"},{"id":"range-fpb.avg.cupy","name":"fpb.avg.cupy deviation","lineWidth":0,"color":"#684158","fillOpacity":0.3,"data":[[100,0.08339929908223892,0.13789022965853798],[500,0.13494491577148438,0.13685226440429688],[1000,0.08431593850158872,0.1378689844584807],[5000,0.13264020284016928,0.13558069864908853],[10000,0.07970841461322545,0.13756508561735178],[50000,0.1399517059326172,0.1399517059326172],[100000,0.09764841225262805,0.13162125124021049],[500000,0.2903143564860026,0.2903143564860026],[1000000,0.6174629153901766,0.6474589087471933],[5000000,3.9045020137647914,4.135237383072231],[10000000,7.846963239239805,8.326134583161455],[50000000,39.198311450732284,41.24893849162341],[100000000,78.1449812988677,78.25723571841199],[500000000,391.026131709818,391.1419387654424],[1000000000,782.1279676948016,782.2542675143457]],"type":"areasplinerange","linkedTo":"line-fpb.avg.cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.avg.numpy","name":"fpb.avg.numpy","color":"#1c7668","data":[[100,0.015043020248413086],[500,0.012878312004937068],[1000,0.01695851484934489],[5000,0.01692904366387261],[10000,0.022825996081034344],[50000,0.04110827590479996],[100000,0.08203824361165366],[500000,0.25993115974195075],[1000000,0.50067196721616]],"type":"spline"},{"id":"range-fpb.avg.numpy","name":"fpb.avg.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.008137669166766344,0.021948371330059828],[500,0.007206356507711103,0.018550267502163032],[1000,0.010086580931101378,0.023830448767588403],[5000,0.010748835998275082,0.02310925132947014],[10000,0.015480498892584666,0.03017149326948402],[50000,0.037151538544963926,0.04506501326463599],[100000,0.07121349351034587,0.09286299371296144],[500000,0.22340020472158215,0.2964621147623194],[1000000,0.449755021530839,0.551588912901481]],"type":"areasplinerange","linkedTo":"line-fpb.avg.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.avg.pycuda","name":"fpb.avg.pycuda","color":"#1fb7c9","data":[[100,0.4590034484863281],[500,0.4635175069173177],[1000,0.45727094014485675],[5000,0.5474408467610677],[10000,0.5530357360839844],[50000,0.5344867706298828],[100000,0.5480130513509115],[500000,0.560601552327474],[1000000,0.9004910786946615],[5000000,0.9235858917236328],[10000000,0.9404182434082031],[50000000,1.2733777364095051],[100000000,1.7350037892659504],[500000000,6.219546000162761],[1000000000,9.12496248881022]],"type":"spline"},{"id":"range-fpb.avg.pycuda","name":"fpb.avg.pycuda deviation","lineWidth":0,"color":"#1fb7c9","fillOpacity":0.3,"data":[[100,0.4455265197646736,0.47248037720798264],[500,0.4571450719129812,0.4698899419216542],[1000,0.4553063041838305,0.459235576105883],[5000,0.5203131472656003,0.5745685462565352],[10000,0.5419383649575389,0.5641331072104299],[50000,0.5256754702027696,0.543298071056996],[100000,0.5330682144217839,0.5629578882800391],[500000,0.5500447801618649,0.5711583244930831],[1000000,0.8779088463823341,0.9230733110069889],[5000000,0.9164034091925671,0.9307683742546985],[10000000,0.9306864810230995,0.9501500057933068],[50000000,1.2061393647503784,1.3406161080686319],[100000000,1.7279249029345056,1.7420826755973953],[500000000,5.79862051604474,6.6404714842807815],[1000000000,9.092744258139826,9.157180719480616]],"type":"areasplinerange","linkedTo":"line-fpb.avg.pycuda","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.avg.cudamat","name":"fpb.avg.cudamat","color":"#7fc218","data":[[100,0.1814762751261393],[500,0.18219153086344403],[1000,0.18656253814697266],[5000,0.20956993103027344],[10000,0.26853879292805993],[50000,0.24620691935221353],[100000,0.3180503845214844],[500000,0.3593762715657552],[1000000,0.3723700841267904],[5000000,0.5291302998860677],[10000000,0.5269050598144531],[50000000,0.9512901306152344],[100000000,1.4770030975341797],[500000000,5.455334981282552],[1000000000,10.48580805460612]],"type":"spline"},{"id":"range-fpb.avg.cudamat","name":"fpb.avg.cudamat deviation","lineWidth":0,"color":"#7fc218","fillOpacity":0.3,"data":[[100,0.1789728800455729,0.18397967020670572],[500,0.18048286437988284,0.18390019734700522],[1000,0.17825762430826822,0.1948674519856771],[5000,0.20138422648111978,0.2177556355794271],[10000,0.21219253540039068,0.3248850504557292],[50000,0.24620691935221353,0.24620691935221353],[100000,0.3180503845214844,0.3180503845214844],[500000,0.3593762715657552,0.3593762715657552],[1000000,0.3596941630045573,0.3850460052490235],[5000000,0.5291302998860677,0.5291302998860677],[10000000,0.5269050598144531,0.5269050598144531],[50000000,0.9512901306152344,0.9512901306152344],[100000000,1.4770030975341797,1.4770030975341797],[500000000,5.455334981282552,5.455334981282552],[1000000000,10.48580805460612,10.48580805460612]],"type":"areasplinerange","linkedTo":"line-fpb.avg.cudamat","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"140417476574681"}
|
CUDAMat |
CuPy |
Numpy |
PyCUDA |
100 |
0.181 |
0.111 |
0.015 |
0.459 |
500 |
0.182 |
0.136 |
0.013 |
0.464 |
1000 |
0.187 |
0.111 |
0.017 |
0.457 |
5000 |
0.210 |
0.134 |
0.017 |
0.547 |
10000 |
0.269 |
0.109 |
0.023 |
0.553 |
50000 |
0.246 |
0.140 |
0.041 |
0.534 |
100000 |
0.318 |
0.115 |
0.082 |
0.548 |
500000 |
0.359 |
0.290 |
0.260 |
0.561 |
1000000 |
0.372 |
0.632 |
0.501 |
0.900 |
5000000 |
0.529 |
4.020 |
|
0.924 |
10000000 |
0.527 |
8.087 |
|
0.940 |
50000000 |
0.951 |
40.224 |
|
1.273 |
100000000 |
1.477 |
78.201 |
|
1.735 |
500000000 |
5.455 |
391.084 |
|
6.220 |
1000000000 |
10.486 |
782.191 |
|
9.125 |
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Maximum"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":500,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.max.cupy","name":"fpb.max.cupy","color":"#684158","data":[[100,0.09154478708902995],[500,0.1193682352701823],[1000,0.09277661641438802],[5000,0.11702378590901692],[10000,0.08515675862630209],[50000,0.12048085530598958],[100000,0.12113253275553384],[500000,0.36072731018066406],[1000000,0.73783485977738],[5000000,4.417737325032552],[10000000,8.846945232815214],[50000000,44.70607969495986],[100000000,89.41454357571074],[500000000,447.5290245480008],[1000000000,895.1391379038492]],"type":"spline"},{"id":"range-fpb.max.cupy","name":"fpb.max.cupy deviation","lineWidth":0,"color":"#684158","fillOpacity":0.3,"data":[[100,0.07113722391449614,0.11195235026356376],[500,0.11912981669108073,0.11960665384928386],[1000,0.07474292106308994,0.11081031176568609],[5000,0.11690457661946614,0.1171429951985677],[10000,0.0708215232348257,0.09949199401777849],[50000,0.12048085530598958,0.12048085530598958],[100000,0.11181692360540088,0.1304481419056668],[500000,0.36072731018066406,0.36072731018066406],[1000000,0.7186737965690358,0.756995922985724],[5000000,4.407875642937928,4.427599007127175],[10000000,8.835332703565584,8.858557762064844],[50000000,44.6435141312888,44.76864525863092],[100000000,89.3902100525378,89.43887709888368],[500000000,447.46798813850245,447.59006095749913],[1000000000,895.056996920271,895.2212788874275]],"type":"areasplinerange","linkedTo":"line-fpb.max.cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.max.cudamat","name":"fpb.max.cudamat","color":"#7fc218","data":[[100,0.14718373616536456],[500,0.16276041666666669],[1000,0.14547506968180338],[5000,0.17396608988444012],[10000,0.16673405965169272],[50000,0.25471051534016925],[100000,0.35834312438964844],[500000,1.1411507924397786],[1000000,2.127607663472493],[5000000,15.192826588948568],[10000000,29.21128273010254],[50000000,142.29512214660645],[100000000,283.1883430480957],[500000000,1411.5010897318523],[1000000000,2821.986118952433]],"type":"spline"},{"id":"range-fpb.max.cudamat","name":"fpb.max.cudamat deviation","lineWidth":0,"color":"#7fc218","fillOpacity":0.3,"data":[[100,0.14638900756835935,0.14797846476236978],[500,0.1540184020996094,0.17150243123372397],[1000,0.14321009318033853,0.14774004618326822],[5000,0.15934308369954428,0.18858909606933597],[10000,0.16673405965169272,0.16673405965169272],[50000,0.25471051534016925,0.25471051534016925],[100000,0.35834312438964844,0.35834312438964844],[500000,1.1411507924397786,1.1411507924397786],[1000000,2.119779586791992,2.135435740152994],[5000000,15.192826588948568,15.192826588948568],[10000000,29.21128273010254,29.21128273010254],[50000000,142.29512214660645,142.29512214660645],[100000000,283.1883430480957,283.1883430480957],[500000000,1411.5010897318523,1411.5010897318523],[1000000000,2821.986118952433,2821.986118952433]],"type":"areasplinerange","linkedTo":"line-fpb.max.cudamat","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.max.numpy","name":"fpb.max.numpy","color":"#1c7668","data":[[100,0.005478660265604654],[500,0.004897912343343099],[1000,0.005602836608886719],[5000,0.007025930616590711],[10000,0.009610705905490452],[50000,0.0254379619251598],[100000,0.03530184427897135],[500000,0.18014300953258167],[1000000,0.3128629525502523]],"type":"spline"},{"id":"range-fpb.max.numpy","name":"fpb.max.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.0029107971107784707,0.008046523420430838],[500,0.0034172398322397314,0.006378584854446466],[1000,0.004129865093271292,0.007075808124502146],[5000,0.0058854068724249866,0.008166454360756435],[10000,0.008571703966990842,0.010649707843990063],[50000,0.024030135457162184,0.02684578839315742],[100000,0.02727843030112719,0.04332525825681552],[500000,0.16916727817863503,0.1911187408865283],[1000000,0.24522309383726879,0.3805028112632358]],"type":"areasplinerange","linkedTo":"line-fpb.max.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.max.pycuda","name":"fpb.max.pycuda","color":"#1fb7c9","data":[[100,0.2686818440755208],[500,0.2784252166748047],[1000,0.2643903096516927],[5000,0.3651618957519531],[10000,0.3623485565185547],[50000,0.3732840220133464],[100000,0.3709952036539714],[500000,0.37139256795247394],[1000000,0.6646633148193359],[5000000,0.6565729777018229],[10000000,0.6788730621337891],[50000000,0.9848276774088541],[100000000,1.4255205790201824],[500000000,4.644950230916341],[1000000000,9.639851252237955]],"type":"spline"},{"id":"range-fpb.max.pycuda","name":"fpb.max.pycuda deviation","lineWidth":0,"color":"#1fb7c9","fillOpacity":0.3,"data":[[100,0.25992911446389827,0.27743457368714336],[500,0.2730595801995464,0.28379085315006297],[1000,0.25486021803650455,0.27392040126688083],[5000,0.35731496596161283,0.3730088255422934],[10000,0.3557501455584543,0.3689469674786551],[50000,0.3704532705941197,0.37611477343257305],[100000,0.36530166237718026,0.3766887449307625],[500000,0.36066211900942935,0.38212301689551853],[1000000,0.6427977442841775,0.6865288853544944],[5000000,0.6454333205085008,0.667712634895145],[10000000,0.658136072539859,0.6996100517277192],[50000000,0.9644209287249232,1.005234426092785],[100000000,1.4231248710156414,1.4279162870247233],[500000000,4.59124472791146,4.698655733921222],[1000000000,9.593403342275536,9.686299162200374]],"type":"areasplinerange","linkedTo":"line-fpb.max.pycuda","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"1399714231450911"}
|
CUDAMat |
CuPy |
Numpy |
PyCUDA |
100 |
0.147 |
0.092 |
0.006 |
0.269 |
500 |
0.163 |
0.119 |
0.005 |
0.278 |
1000 |
0.145 |
0.093 |
0.006 |
0.264 |
5000 |
0.174 |
0.117 |
0.007 |
0.365 |
10000 |
0.167 |
0.085 |
0.010 |
0.362 |
50000 |
0.255 |
0.120 |
0.025 |
0.373 |
100000 |
0.358 |
0.121 |
0.035 |
0.371 |
500000 |
1.141 |
0.361 |
0.180 |
0.371 |
1000000 |
2.128 |
0.738 |
0.313 |
0.665 |
5000000 |
15.193 |
4.418 |
|
0.657 |
10000000 |
29.211 |
8.847 |
|
0.679 |
50000000 |
142.295 |
44.706 |
|
0.985 |
100000000 |
283.188 |
89.415 |
|
1.426 |
500000000 |
1411.501 |
447.529 |
|
4.645 |
1000000000 |
2821.986 |
895.139 |
|
9.640 |
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Sinus"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":500,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.sin.cupy","name":"fpb.sin.cupy","color":"#684158","data":[[100,0.08163187238905165],[500,0.1043081283569336],[1000,0.07698800828721789],[5000,0.10263919830322266],[10000,0.07753690083821616],[50000,0.1659393310546875],[100000,0.1620769500732422],[500000,0.804742177327474],[1000000,1.0104815165201824],[5000000,4.021406173706055],[10000000,15.713214874267578],[50000000,81.9238821665446],[100000000,170.69252332051596],[500000000,777.0030233595106],[1000000000,1623.2447624206543]],"type":"spline"},{"id":"range-fpb.sin.cupy","name":"fpb.sin.cupy deviation","lineWidth":0,"color":"#684158","fillOpacity":0.3,"data":[[100,0.061115574528444995,0.1021481702496583],[500,0.09735425313313802,0.11126200358072917],[1000,0.057634208810273785,0.09634180776416199],[5000,0.10156631469726562,0.10371208190917969],[10000,0.06349595445713847,0.09157784721929384],[50000,0.1659393310546875,0.1659393310546875],[100000,0.10945708924180116,0.21469681090468323],[500000,0.804742177327474,0.804742177327474],[1000000,0.540491918364374,1.4804711146759906],[5000000,3.316352090552452,4.726460256859657],[10000000,15.660254655084456,15.7661750934507],[50000000,76.71800385546655,87.12976047762265],[100000000,160.62067913302494,180.76436750800698],[500000000,776.4721115347995,777.5339351842217],[1000000000,1523.6456789651609,1722.8438458761477]],"type":"areasplinerange","linkedTo":"line-fpb.sin.cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sin.numpy","name":"fpb.sin.numpy","color":"#1c7668","data":[[100,0.0034034252166748047],[500,0.010360611809624566],[1000,0.017958084742228188],[5000,0.0870929823981391],[10000,0.15482393900553384],[50000,0.9987854235100023],[100000,0.8127768834431967],[500000,10.135372624252781],[1000000,16.54103506179083]],"type":"spline"},{"id":"range-fpb.sin.numpy","name":"fpb.sin.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.003047129897223611,0.0037597205361259984],[500,0.00913400057529428,0.01158722304395485],[1000,0.013689892151862096,0.02222627733259428],[5000,0.06763357678515872,0.10655238801111949],[10000,0.1055936589620469,0.2040542190490208],[50000,0.8097801070072574,1.1877907400127472],[100000,0.8012040167977726,0.8243497500886207],[500000,8.214847171023687,12.055898077481876],[1000000,11.257488843287438,21.82458128029422]],"type":"areasplinerange","linkedTo":"line-fpb.sin.numpy","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"1399714231450918"}
|
CUDAMat |
CuPy |
Numpy |
PyCUDA |
100 |
|
0.082 |
0.003 |
|
500 |
|
0.104 |
0.010 |
|
1000 |
|
0.077 |
0.018 |
|
5000 |
|
0.103 |
0.087 |
|
10000 |
|
0.078 |
0.158 |
|
50000 |
|
0.166 |
0.999 |
|
100000 |
|
0.162 |
0.813 |
|
500000 |
|
0.805 |
10.135 |
|
1000000 |
|
1.010 |
16.541 |
|
5000000 |
|
4.021 |
|
|
10000000 |
|
15.713 |
|
|
50000000 |
|
81.924 |
|
|
100000000 |
|
170.693 |
|
|
500000000 |
|
777.003 |
|
|
1000000000 |
|
1623.245 |
|
|
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Sum"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":500,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.sum.cupy","name":"fpb.sum.cupy","color":"#684158","data":[[100,0.09622308943006729],[500,0.1188516616821289],[1000,0.09522438049316406],[5000,0.12858708699544272],[10000,0.08899052937825522],[50000,0.11682510375976562],[100000,0.1078033447265625],[500000,0.2857049306233724],[1000000,0.6181699258309824],[5000000,3.9792590671115455],[10000000,8.006519741482204],[50000000,38.78423902723524],[100000000,77.70442962646484],[500000000,389.10208808051215],[1000000000,777.9989242553711]],"type":"spline"},{"id":"range-fpb.sum.cupy","name":"fpb.sum.cupy deviation","lineWidth":0,"color":"#684158","fillOpacity":0.3,"data":[[100,0.0701561700743909,0.12229000878574367],[500,0.11269251505533853,0.12501080830891928],[1000,0.07505944879501156,0.11538931219131657],[5000,0.12143452962239584,0.1357396443684896],[10000,0.07509358089862644,0.10288747785788399],[50000,0.11682510375976562,0.11682510375976562],[100000,0.09714395321505159,0.11846273623807341],[500000,0.2857049306233724,0.2857049306233724],[1000000,0.6066325553089542,0.6297072963530106],[5000000,3.8607689273485843,4.097749206874507],[10000000,7.767571496035485,8.245467986928924],[50000000,38.7718874800238,38.796590574446675],[100000000,77.68394771635333,77.72491153657636],[500000000,388.99925580275544,389.20492035826885],[1000000000,777.9642323721744,778.0336161385678]],"type":"areasplinerange","linkedTo":"line-fpb.sum.cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum.numpy","name":"fpb.sum.numpy","color":"#1c7668","data":[[100,0.010020136833190918],[500,0.008868111504448785],[1000,0.010989705721537272],[5000,0.01457267337375217],[10000,0.026676389906141493],[50000,0.050360361735026046],[100000,0.40508270263671875],[500000,0.40320251927231304],[1000000,1.452240262712751]],"type":"spline"},{"id":"range-fpb.sum.numpy","name":"fpb.sum.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.00438440994876917,0.015655863717612666],[500,0.004101808019230319,0.01363441498966725],[1000,0.005997785383294387,0.015981626059780155],[5000,0.005475058142081263,0.023670288605423077],[10000,0.00714080160903121,0.04621197820325178],[50000,-0.0013704102118419215,0.10209113368189401],[100000,0.39730353733639595,0.41286186793704155],[500000,-0.10867355418084051,0.9150785927254665],[1000000,-0.10297584147992511,3.0074563669054273]],"type":"areasplinerange","linkedTo":"line-fpb.sum.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum.cudamat","name":"fpb.sum.cudamat","color":"#7fc218","data":[[100,0.18195311228434247],[500,0.19824504852294922],[1000,0.17213821411132812],[5000,0.18664201100667316],[10000,0.1910527547200521],[50000,0.2257823944091797],[100000,0.22522608439127603],[500000,0.3170967102050781],[1000000,0.333706537882487],[5000000,0.44544537862141925],[10000000,0.5105336507161459],[50000000,0.9601910909016927],[100000000,1.4963150024414062],[500000000,5.345344543457031],[1000000000,10.376056035359701]],"type":"spline"},{"id":"range-fpb.sum.cudamat","name":"fpb.sum.cudamat deviation","lineWidth":0,"color":"#7fc218","fillOpacity":0.3,"data":[[100,0.17340977986653647,0.19049644470214847],[500,0.1923243204752604,0.20416577657063803],[1000,0.16681353251139322,0.17746289571126303],[5000,0.18239021301269528,0.19089380900065103],[10000,0.1910527547200521,0.1910527547200521],[50000,0.2257823944091797,0.2257823944091797],[100000,0.22522608439127603,0.22522608439127603],[500000,0.3170967102050781,0.3170967102050781],[1000000,0.30795733133951825,0.35945574442545575],[5000000,0.44544537862141925,0.44544537862141925],[10000000,0.5105336507161459,0.5105336507161459],[50000000,0.9601910909016927,0.9601910909016927],[100000000,1.4963150024414062,1.4963150024414062],[500000000,5.345344543457031,5.345344543457031],[1000000000,10.376056035359701,10.376056035359701]],"type":"areasplinerange","linkedTo":"line-fpb.sum.cudamat","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum.pycuda","name":"fpb.sum.pycuda","color":"#1fb7c9","data":[[100,0.26823679606119794],[500,0.262451171875],[1000,0.26866594950358075],[5000,0.35907427469889325],[10000,0.37581125895182294],[50000,0.37024815877278644],[100000,0.3688494364420573],[500000,0.3734270731608073],[1000000,0.6469567616780599],[5000000,0.6581147511800131],[10000000,0.6746768951416016],[50000000,1.0092099507649739],[100000000,1.4434973398844402],[500000000,5.062675476074219],[1000000000,9.623320897420248]],"type":"spline"},{"id":"range-fpb.sum.pycuda","name":"fpb.sum.pycuda deviation","lineWidth":0,"color":"#1fb7c9","fillOpacity":0.3,"data":[[100,0.26130089585281757,0.2751726962695783],[500,0.24994366867977943,0.27495867507022054],[1000,0.26093076171946916,0.27640113728769233],[5000,0.350369300708263,0.3677792486895235],[10000,0.3720642505689657,0.3795582673346802],[50000,0.3577805716393294,0.38271574590624347],[100000,0.36695391294000373,0.3707449599441109],[500000,0.3724326774393961,0.3744214688822185],[1000000,0.6283970599394998,0.6655164634166201],[5000000,0.6458565835996506,0.6703729187603755],[10000000,0.662216746945607,0.6871370433375962],[50000000,0.9788232786371351,1.0395966228928126],[100000000,1.426070161248374,1.4609245185205064],[500000000,4.991991501525405,5.133359450623033],[1000000000,9.53860873671775,9.708033058122746]],"type":"areasplinerange","linkedTo":"line-fpb.sum.pycuda","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"139971423450999"}
|
CUDAMat |
CuPy |
Numpy |
PyCUDA |
100 |
0.182 |
0.096 |
0.010 |
0.268 |
500 |
0.198 |
0.119 |
0.009 |
0.262 |
1000 |
0.172 |
0.095 |
0.011 |
0.269 |
5000 |
0.187 |
0.129 |
0.015 |
0.359 |
10000 |
0.191 |
0.089 |
0.027 |
0.376 |
50000 |
0.226 |
0.117 |
0.050 |
0.370 |
100000 |
0.225 |
0.108 |
0.405 |
0.369 |
500000 |
0.317 |
0.286 |
0.403 |
0.373 |
1000000 |
0.334 |
0.618 |
1.452 |
0.647 |
5000000 |
0.445 |
3.979 |
|
0.658 |
10000000 |
0.511 |
8.007 |
|
0.675 |
50000000 |
0.960 |
38.784 |
|
1.009 |
100000000 |
1.496 |
77.704 |
|
1.443 |
500000000 |
5.345 |
389.102 |
|
5.063 |
1000000000 |
10.376 |
777.999 |
|
9.623 |
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Sum 2D"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":2000,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.sum2d.numpy","name":"fpb.sum2d.numpy","color":"#1c7668","data":[[100,0.07962385813395183],[500,0.31534830729166663],[1000,0.6102508968777126],[5000,3.0378500620524087],[10000,5.898637771606445],[50000,29.40026919047038],[100000,58.727664947509766],[500000,294.6461041768392],[1000000,585.7833915286594]],"type":"spline"},{"id":"range-fpb.sum2d.numpy","name":"fpb.sum2d.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.07390818280883991,0.08533953345906374],[500,0.3135204315185547,0.31717618306477857],[1000,0.6008196204622464,0.6196821732931789],[5000,3.0309359232584634,3.044764200846354],[10000,5.828538592452974,5.968736950759917],[50000,29.40026919047038,29.40026919047038],[100000,58.35772586315737,59.09760403186216],[500000,294.6461041768392,294.6461041768392],[1000000,583.0000899086199,588.566693148699]],"type":"areasplinerange","linkedTo":"line-fpb.sum2d.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum2d.cupy","name":"fpb.sum2d.cupy","color":"#684158","data":[[100,0.10277165306939018],[500,0.1341899236043294],[1000,0.10089874267578125],[5000,0.1287062962849935],[10000,0.2488994598388672],[50000,0.2700487772623698],[100000,2.395331859588623],[500000,3.215233484903971],[1000000,19.542005327012802],[5000000,31.483358807033966],[10000000,63.10420566134982]],"type":"spline"},{"id":"range-fpb.sum2d.cupy","name":"fpb.sum2d.cupy deviation","lineWidth":0,"color":"#684158","fillOpacity":0.3,"data":[[100,0.0765345859628673,0.12900872017591306],[500,0.13184547424316403,0.13653437296549478],[1000,0.08004981381918669,0.12174767153237581],[5000,0.12596448262532553,0.13144810994466147],[10000,0.190563743678637,0.3072351759990974],[50000,0.2700487772623698,0.2700487772623698],[100000,1.3405390228581342,3.450124696319112],[500000,3.215233484903971,3.215233484903971],[1000000,7.685583195605393,31.398427458420212],[5000000,31.45886566076144,31.507851953306492],[10000000,63.08898274162153,63.11942858107812]],"type":"areasplinerange","linkedTo":"line-fpb.sum2d.cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum2d.cudamat","name":"fpb.sum2d.cudamat","color":"#7fc218","data":[[100,0.1827875773111979],[500,0.1952250798543294],[1000,0.22606054941813153],[5000,0.3091096878051758],[10000,0.310977300008138],[50000,0.4424254099527995],[100000,0.4432996114095052],[500000,0.7770061492919922],[1000000,1.1298259099324544],[5000000,3.175020217895508],[10000000,5.774100621541341]],"type":"spline"},{"id":"range-fpb.sum2d.cudamat","name":"fpb.sum2d.cudamat deviation","lineWidth":0,"color":"#7fc218","fillOpacity":0.3,"data":[[100,0.17158190409342447,0.19399325052897134],[500,0.1924037933349609,0.1980463663736979],[1000,0.20845731099446618,0.24366378784179688],[5000,0.3037452697753906,0.31447410583496094],[10000,0.310977300008138,0.310977300008138],[50000,0.4424254099527995,0.4424254099527995],[100000,0.4432996114095052,0.4432996114095052],[500000,0.7770061492919922,0.7770061492919922],[1000000,1.1080106099446614,1.1516412099202473],[5000000,3.175020217895508,3.175020217895508],[10000000,5.774100621541341,5.774100621541341]],"type":"areasplinerange","linkedTo":"line-fpb.sum2d.cudamat","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"1399714231450567"}
|
CUDAMat |
CuPy |
Numpy |
PyCUDA |
100 |
0.183 |
0.103 |
0.080 |
|
500 |
0.195 |
0.134 |
0.315 |
|
1000 |
0.226 |
0.101 |
0.610 |
|
5000 |
0.309 |
0.129 |
3.038 |
|
10000 |
0.311 |
0.249 |
5.899 |
|
50000 |
0.442 |
0.270 |
29.400 |
|
100000 |
0.443 |
2.395 |
58.728 |
|
500000 |
0.777 |
3.215 |
294.646 |
|
1000000 |
1.130 |
19.542 |
585.783 |
|
5000000 |
3.175 |
31.483 |
|
|
10000000 |
5.774 |
63.104 |
|
Assumptions:
- The GPU unhooking is really far from CPU memory filling error
- Small datasets (<100K) doesn't really require a GPU
- Most of the frameworks are able to handle 100 billions data points in reasonable times
- Some frameworks are still stable after and could handle more if they would have more GPU RAM
- CPU is directly out of the race for multi-dimension arrays
Yes I wrote multi-processing wasn't the goal of the article but there are several solutions which deserving some lines and I'll talk about:
With these approaches data are generally chunked and computations are shared across threads, processes or nodes. It has several implications:
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":" Average"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":400,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.avg.spark","name":"fpb.avg.spark","color":"#71b0d2","data":[[100,214.2309029897054],[500,214.69622850418088],[1000,212.69671122233072],[5000,209.33008193969727],[10000,218.30356121063232],[50000,217.4650033315023],[100000,273.6967404683431],[500000,332.14807510375977]],"type":"spline"},{"id":"range-fpb.avg.spark","name":"fpb.avg.spark deviation","lineWidth":0,"color":"#71b0d2","fillOpacity":0.3,"data":[[100,203.7197619439968,224.74204403541404],[500,207.93148601317404,221.46097099518772],[1000,204.89791745844497,220.49550498621647],[5000,203.16428273424805,215.49588114514648],[10000,213.2904494011317,223.31667302013295],[50000,213.0543295877296,221.87567707527498],[100000,273.6967404683431,273.6967404683431],[500000,332.14807510375977,332.14807510375977]],"type":"areasplinerange","linkedTo":"line-fpb.avg.spark","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.avg.cupy","name":"fpb.avg.cupy","color":"#684158","data":[[100,0.11064476437038845],[500,0.13589859008789062],[1000,0.11109246148003471],[5000,0.1341104507446289],[10000,0.10863675011528862],[50000,0.1399517059326172],[100000,0.11463483174641927],[500000,0.2903143564860026],[1000000,0.6324609120686849],[5000000,4.019869698418511],[10000000,8.08654891120063],[50000000,40.22362497117785],[100000000,78.20110850863985],[500000000,391.0840352376302],[1000000000,782.1911176045736]],"type":"spline"},{"id":"range-fpb.avg.cupy","name":"fpb.avg.cupy deviation","lineWidth":0,"color":"#684158","fillOpacity":0.3,"data":[[100,0.08339929908223892,0.13789022965853798],[500,0.13494491577148438,0.13685226440429688],[1000,0.08431593850158872,0.1378689844584807],[5000,0.13264020284016928,0.13558069864908853],[10000,0.07970841461322545,0.13756508561735178],[50000,0.1399517059326172,0.1399517059326172],[100000,0.09764841225262805,0.13162125124021049],[500000,0.2903143564860026,0.2903143564860026],[1000000,0.6174629153901766,0.6474589087471933],[5000000,3.9045020137647914,4.135237383072231],[10000000,7.846963239239805,8.326134583161455],[50000000,39.198311450732284,41.24893849162341],[100000000,78.1449812988677,78.25723571841199],[500000000,391.026131709818,391.1419387654424],[1000000000,782.1279676948016,782.2542675143457]],"type":"areasplinerange","linkedTo":"line-fpb.avg.cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.avg.numpy","name":"fpb.avg.numpy","color":"#1c7668","data":[[100,0.015043020248413086],[500,0.012878312004937068],[1000,0.01695851484934489],[5000,0.01692904366387261],[10000,0.022825996081034344],[50000,0.04110827590479996],[100000,0.08203824361165366],[500000,0.25993115974195075],[1000000,0.50067196721616]],"type":"spline"},{"id":"range-fpb.avg.numpy","name":"fpb.avg.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.008137669166766344,0.021948371330059828],[500,0.007206356507711103,0.018550267502163032],[1000,0.010086580931101378,0.023830448767588403],[5000,0.010748835998275082,0.02310925132947014],[10000,0.015480498892584666,0.03017149326948402],[50000,0.037151538544963926,0.04506501326463599],[100000,0.07121349351034587,0.09286299371296144],[500000,0.22340020472158215,0.2964621147623194],[1000000,0.449755021530839,0.551588912901481]],"type":"areasplinerange","linkedTo":"line-fpb.avg.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.avg.dask_cupy","name":"fpb.avg.dask_cupy","color":"#cfd67f","data":[[100,6.990909576416016],[500,6.782929102579753],[1000,6.888151168823242],[5000,7.302522659301758],[10000,6.610711415608724],[50000,6.831725438435872],[100000,6.8187713623046875],[500000,7.717132568359375],[1000000,7.209459940592448],[5000000,6.949901580810547],[10000000,7.594188054402669],[50000000,8.729060490926107],[100000000,10.980765024820963],[500000000,26.666005452473957],[1000000000,45.295000076293945]],"type":"spline"},{"id":"range-fpb.avg.dask_cupy","name":"fpb.avg.dask_cupy deviation","lineWidth":0,"color":"#cfd67f","fillOpacity":0.3,"data":[[100,6.990909576416016,6.990909576416016],[500,6.782929102579753,6.782929102579753],[1000,6.888151168823242,6.888151168823242],[5000,7.302522659301758,7.302522659301758],[10000,6.610711415608724,6.610711415608724],[50000,6.831725438435872,6.831725438435872],[100000,6.8187713623046875,6.8187713623046875],[500000,7.717132568359375,7.717132568359375],[1000000,7.209459940592448,7.209459940592448],[5000000,6.949901580810547,6.949901580810547],[10000000,7.594188054402669,7.594188054402669],[50000000,8.729060490926107,8.729060490926107],[100000000,10.980765024820963,10.980765024820963],[500000000,26.666005452473957,26.666005452473957],[1000000000,45.295000076293945,45.295000076293945]],"type":"areasplinerange","linkedTo":"line-fpb.avg.dask_cupy","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"139971423449384"}
|
CuPy |
Dask |
Dask CuPy |
Numpy |
Spark |
100 |
0.111 |
|
6.991 |
0.015 |
214.231 |
500 |
0.136 |
|
6.783 |
0.013 |
214.696 |
1000 |
0.111 |
|
6.888 |
0.017 |
212.697 |
5000 |
0.134 |
|
7.303 |
0.017 |
209.330 |
10000 |
0.109 |
|
6.611 |
0.023 |
218.304 |
50000 |
0.140 |
|
6.832 |
0.041 |
217.465 |
100000 |
0.115 |
|
6.819 |
0.082 |
273.697 |
500000 |
0.290 |
|
7.717 |
0.260 |
332.148 |
1000000 |
0.632 |
|
7.209 |
0.501 |
|
5000000 |
4.020 |
|
6.950 |
|
|
10000000 |
8.087 |
|
7.594 |
|
|
50000000 |
40.224 |
|
8.729 |
|
|
100000000 |
78.201 |
|
10.981 |
|
|
500000000 |
391.084 |
|
26.666 |
|
|
1000000000 |
782.191 |
|
45.295 |
|
|
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Maximum"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":500,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.max.cupy","name":"fpb.max.cupy","color":"#684158","data":[[100,0.09154478708902995],[500,0.1193682352701823],[1000,0.09277661641438802],[5000,0.11702378590901692],[10000,0.08515675862630209],[50000,0.12048085530598958],[100000,0.12113253275553384],[500000,0.36072731018066406],[1000000,0.73783485977738],[5000000,4.417737325032552],[10000000,8.846945232815214],[50000000,44.70607969495986],[100000000,89.41454357571074],[500000000,447.5290245480008],[1000000000,895.1391379038492]],"type":"spline"},{"id":"range-fpb.max.cupy","name":"fpb.max.cupy deviation","lineWidth":0,"color":"#684158","fillOpacity":0.3,"data":[[100,0.07113722391449614,0.11195235026356376],[500,0.11912981669108073,0.11960665384928386],[1000,0.07474292106308994,0.11081031176568609],[5000,0.11690457661946614,0.1171429951985677],[10000,0.0708215232348257,0.09949199401777849],[50000,0.12048085530598958,0.12048085530598958],[100000,0.11181692360540088,0.1304481419056668],[500000,0.36072731018066406,0.36072731018066406],[1000000,0.7186737965690358,0.756995922985724],[5000000,4.407875642937928,4.427599007127175],[10000000,8.835332703565584,8.858557762064844],[50000000,44.6435141312888,44.76864525863092],[100000000,89.3902100525378,89.43887709888368],[500000000,447.46798813850245,447.59006095749913],[1000000000,895.056996920271,895.2212788874275]],"type":"areasplinerange","linkedTo":"line-fpb.max.cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.max.dask_cupy","name":"fpb.max.dask_cupy","color":"#cfd67f","data":[[100,6.029605865478516],[500,6.58567746480306],[1000,6.053050359090169],[5000,6.0795942942301435],[10000,5.943695704142253],[50000,6.116390228271484],[100000,6.505171457926433],[500000,6.620486577351888],[1000000,6.369988123575847],[5000000,6.226380666097005],[10000000,6.459156672159831],[50000000,7.991552352905273],[100000000,9.816964467366537],[500000000,24.647871653238933],[1000000000,42.768001556396484]],"type":"spline"},{"id":"range-fpb.max.dask_cupy","name":"fpb.max.dask_cupy deviation","lineWidth":0,"color":"#cfd67f","fillOpacity":0.3,"data":[[100,6.029605865478516,6.029605865478516],[500,6.58567746480306,6.58567746480306],[1000,6.053050359090169,6.053050359090169],[5000,6.0795942942301435,6.0795942942301435],[10000,5.943695704142253,5.943695704142253],[50000,6.116390228271484,6.116390228271484],[100000,6.505171457926433,6.505171457926433],[500000,6.620486577351888,6.620486577351888],[1000000,6.369988123575847,6.369988123575847],[5000000,6.226380666097005,6.226380666097005],[10000000,6.459156672159831,6.459156672159831],[50000000,7.991552352905273,7.991552352905273],[100000000,9.816964467366537,9.816964467366537],[500000000,24.647871653238933,24.647871653238933],[1000000000,42.768001556396484,42.768001556396484]],"type":"areasplinerange","linkedTo":"line-fpb.max.dask_cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.max.numpy","name":"fpb.max.numpy","color":"#1c7668","data":[[100,0.005478660265604654],[500,0.004897912343343099],[1000,0.005602836608886719],[5000,0.007025930616590711],[10000,0.009610705905490452],[50000,0.0254379619251598],[100000,0.03530184427897135],[500000,0.18014300953258167],[1000000,0.3128629525502523]],"type":"spline"},{"id":"range-fpb.max.numpy","name":"fpb.max.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.0029107971107784707,0.008046523420430838],[500,0.0034172398322397314,0.006378584854446466],[1000,0.004129865093271292,0.007075808124502146],[5000,0.0058854068724249866,0.008166454360756435],[10000,0.008571703966990842,0.010649707843990063],[50000,0.024030135457162184,0.02684578839315742],[100000,0.02727843030112719,0.04332525825681552],[500000,0.16916727817863503,0.1911187408865283],[1000000,0.24522309383726879,0.3805028112632358]],"type":"areasplinerange","linkedTo":"line-fpb.max.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.max.dask","name":"fpb.max.dask","color":"#3ad728","data":[[100,4.009611871507433],[500,3.9690838919745555],[1000,5.334031184514363],[5000,3.799904187520345],[10000,5.0083902147081165],[50000,3.299733942205256],[100000,11.348370711008707],[500000,10.883828365441524],[1000000,17.597482363382973]],"type":"spline"},{"id":"range-fpb.max.dask","name":"fpb.max.dask deviation","lineWidth":0,"color":"#3ad728","fillOpacity":0.3,"data":[[100,-0.3160860652036259,8.335309808218492],[500,-0.2599470056423274,8.198114789591438],[1000,1.0413468645662372,9.626715504462489],[5000,-0.024996096992093708,7.624804472032784],[10000,0.8880899339361283,9.128690495480104],[50000,0.2127365957063656,6.386731288704146],[100000,10.217474379491069,12.479267042526345],[500000,10.07474570679301,11.692911024090037],[1000000,14.146747118535263,21.048217608230683]],"type":"areasplinerange","linkedTo":"line-fpb.max.dask","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.max.spark","name":"fpb.max.spark","color":"#71b0d2","data":[[100,214.42437171936035],[500,202.50455538431805],[1000,205.60109615325928],[5000,211.43925189971924],[10000,218.30904483795166],[50000,213.22061618169147],[100000,232.70837465922037]],"type":"spline"},{"id":"range-fpb.max.spark","name":"fpb.max.spark deviation","lineWidth":0,"color":"#71b0d2","fillOpacity":0.3,"data":[[100,205.8769879967579,222.9717554419628],[500,196.26056141148152,208.7485493571546],[1000,192.40347939217258,218.79871291434597],[5000,202.17887748291815,220.69962631652032],[10000,207.60974891431007,229.00834076159325],[50000,199.24407663128204,227.1971557321009],[100000,232.70837465922037,232.70837465922037]],"type":"areasplinerange","linkedTo":"line-fpb.max.spark","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"139971423449496"}
|
CuPy |
Dask |
Dask CuPy |
Numpy |
Spark |
100 |
0.092 |
4.010 |
6.030 |
0.006 |
214.424 |
500 |
0.119 |
3.969 |
6.586 |
0.005 |
202.505 |
1000 |
0.093 |
5.334 |
6.053 |
0.006 |
205.601 |
5000 |
0.117 |
3.800 |
6.080 |
0.007 |
211.439 |
10000 |
0.085 |
5.008 |
5.944 |
0.010 |
218.309 |
50000 |
0.120 |
3.300 |
6.116 |
0.025 |
213.221 |
100000 |
0.121 |
11.348 |
6.505 |
0.035 |
232.708 |
500000 |
0.361 |
10.884 |
6.620 |
0.180 |
|
1000000 |
0.738 |
17.597 |
6.370 |
0.313 |
|
5000000 |
4.418 |
|
6.226 |
|
|
10000000 |
8.847 |
|
6.459 |
|
|
50000000 |
44.706 |
|
7.992 |
|
|
100000000 |
89.415 |
|
9.817 |
|
|
500000000 |
447.529 |
|
24.648 |
|
|
1000000000 |
895.139 |
|
42.768 |
|
|
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Sinus"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":500,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.sin.dask","name":"fpb.sin.dask","color":"#3ad728","data":[[100,3.5883691575792103],[500,3.5903032620747886],[1000,4.558194478352865],[5000,3.5749175813463],[10000,4.503596199883355],[50000,3.94424091685902],[100000,9.21038786570231],[500000,16.254243850708008],[1000000,24.246033112208046]],"type":"spline"},{"id":"range-fpb.sin.dask","name":"fpb.sin.dask deviation","lineWidth":0,"color":"#3ad728","fillOpacity":0.3,"data":[[100,0.3426146872675164,6.834123627890904],[500,0.38917287863282946,6.791433645516747],[1000,1.4582324814158047,7.658156475289926],[5000,0.6572363826025831,6.492598780090017],[10000,1.4422218227168275,7.564970577049882],[50000,1.471485849205481,6.416995984512559],[100000,8.215503753957702,10.20527197744692],[500000,15.260886875580418,17.247600825835598],[1000000,16.52026836523773,31.971797859178363]],"type":"areasplinerange","linkedTo":"line-fpb.sin.dask","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sin.spark","name":"fpb.sin.spark","color":"#71b0d2","data":[[100,168.58235994974774],[500,170.11443773905435],[1000,174.2393970489502],[5000,202.54278182983398],[10000,198.26642672220865],[50000,440.1737054189046],[100000,590.9737745920817]],"type":"spline"},{"id":"range-fpb.sin.spark","name":"fpb.sin.spark deviation","lineWidth":0,"color":"#71b0d2","fillOpacity":0.3,"data":[[100,166.72857602437338,170.4361438751221],[500,170.11443773905435,170.11443773905435],[1000,174.2393970489502,174.2393970489502],[5000,202.54278182983398,202.54278182983398],[10000,198.26642672220865,198.26642672220865],[50000,440.1737054189046,440.1737054189046],[100000,590.9737745920817,590.9737745920817]],"type":"areasplinerange","linkedTo":"line-fpb.sin.spark","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sin.dask_cupy","name":"fpb.sin.dask_cupy","color":"#cfd67f","data":[[100,5.966981252034505],[500,5.382378896077474],[1000,5.300680796305339],[5000,5.32070795694987],[10000,5.380948384602864],[50000,5.348602930704753],[100000,5.39390246073405],[500000,5.575497945149739],[1000000,5.469163258870442],[5000000,5.538463592529297],[10000000,5.792140960693359],[50000000,7.541418075561523],[100000000,9.23466682434082],[500000000,24.361610412597656],[1000000000,42.894204457600914]],"type":"spline"},{"id":"range-fpb.sin.dask_cupy","name":"fpb.sin.dask_cupy deviation","lineWidth":0,"color":"#cfd67f","fillOpacity":0.3,"data":[[100,5.966981252034505,5.966981252034505],[500,5.382378896077474,5.382378896077474],[1000,5.300680796305339,5.300680796305339],[5000,5.32070795694987,5.32070795694987],[10000,5.380948384602864,5.380948384602864],[50000,5.348602930704753,5.348602930704753],[100000,5.39390246073405,5.39390246073405],[500000,5.575497945149739,5.575497945149739],[1000000,5.469163258870442,5.469163258870442],[5000000,5.538463592529297,5.538463592529297],[10000000,5.792140960693359,5.792140960693359],[50000000,7.541418075561523,7.541418075561523],[100000000,9.23466682434082,9.23466682434082],[500000000,24.361610412597656,24.361610412597656],[1000000000,42.894204457600914,42.894204457600914]],"type":"areasplinerange","linkedTo":"line-fpb.sin.dask_cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sin.numpy","name":"fpb.sin.numpy","color":"#1c7668","data":[[100,0.0034034252166748047],[500,0.010360611809624566],[1000,0.017958084742228188],[5000,0.0870929823981391],[10000,0.15482393900553384],[50000,0.9987854235100023],[100000,0.8127768834431967],[500000,10.135372624252781],[1000000,16.54103506179083]],"type":"spline"},{"id":"range-fpb.sin.numpy","name":"fpb.sin.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.003047129897223611,0.0037597205361259984],[500,0.00913400057529428,0.01158722304395485],[1000,0.013689892151862096,0.02222627733259428],[5000,0.06763357678515872,0.10655238801111949],[10000,0.1055936589620469,0.2040542190490208],[50000,0.8097801070072574,1.1877907400127472],[100000,0.8012040167977726,0.8243497500886207],[500000,8.214847171023687,12.055898077481876],[1000000,11.257488843287438,21.82458128029422]],"type":"areasplinerange","linkedTo":"line-fpb.sin.numpy","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"1399714231450929"}
|
CuPy |
Dask |
Dask CuPy |
Numpy |
Spark |
100 |
0.082 |
3.588 |
5.967 |
0.003 |
168.582 |
500 |
0.104 |
3.590 |
5.382 |
0.010 |
170.114 |
1000 |
0.077 |
4.558 |
5.301 |
0.018 |
174.239 |
5000 |
0.103 |
3.575 |
5.321 |
0.087 |
202.543 |
10000 |
0.078 |
4.504 |
5.381 |
0.158 |
198.266 |
50000 |
0.166 |
3.944 |
5.349 |
0.999 |
440.174 |
100000 |
0.162 |
9.210 |
5.394 |
0.813 |
590.974 |
500000 |
0.805 |
16.254 |
5.575 |
10.135 |
|
1000000 |
1.010 |
24.246 |
5.469 |
16.541 |
|
5000000 |
4.021 |
|
5.538 |
|
|
10000000 |
15.713 |
|
5.792 |
|
|
50000000 |
81.924 |
|
7.541 |
|
|
100000000 |
170.693 |
|
9.235 |
|
|
500000000 |
777.003 |
|
24.362 |
|
|
1000000000 |
1623.245 |
|
42.894 |
|
|
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Sum"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":500,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.sum.dask_cupy","name":"fpb.sum.dask_cupy","color":"#cfd67f","data":[[100,6.931145985921224],[500,6.58877690633138],[1000,7.343451182047526],[5000,6.846825281778972],[10000,6.931384404500325],[50000,6.799538930257161],[100000,6.762584050496419],[500000,7.295846939086914],[1000000,7.231871287027995],[5000000,6.986220677693685],[10000000,7.221301396687825],[50000000,8.989731470743815],[100000000,10.669708251953125],[500000000,26.001532872517902],[1000000000,45.08074124654134]],"type":"spline"},{"id":"range-fpb.sum.dask_cupy","name":"fpb.sum.dask_cupy deviation","lineWidth":0,"color":"#cfd67f","fillOpacity":0.3,"data":[[100,6.931145985921224,6.931145985921224],[500,6.58877690633138,6.58877690633138],[1000,7.343451182047526,7.343451182047526],[5000,6.846825281778972,6.846825281778972],[10000,6.931384404500325,6.931384404500325],[50000,6.799538930257161,6.799538930257161],[100000,6.762584050496419,6.762584050496419],[500000,7.295846939086914,7.295846939086914],[1000000,7.231871287027995,7.231871287027995],[5000000,6.986220677693685,6.986220677693685],[10000000,7.221301396687825,7.221301396687825],[50000000,8.989731470743815,8.989731470743815],[100000000,10.669708251953125,10.669708251953125],[500000000,26.001532872517902,26.001532872517902],[1000000000,45.08074124654134,45.08074124654134]],"type":"areasplinerange","linkedTo":"line-fpb.sum.dask_cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum.cupy","name":"fpb.sum.cupy","color":"#684158","data":[[100,0.09622308943006729],[500,0.1188516616821289],[1000,0.09522438049316406],[5000,0.12858708699544272],[10000,0.08899052937825522],[50000,0.11682510375976562],[100000,0.1078033447265625],[500000,0.2857049306233724],[1000000,0.6181699258309824],[5000000,3.9792590671115455],[10000000,8.006519741482204],[50000000,38.78423902723524],[100000000,77.70442962646484],[500000000,389.10208808051215],[1000000000,777.9989242553711]],"type":"spline"},{"id":"range-fpb.sum.cupy","name":"fpb.sum.cupy deviation","lineWidth":0,"color":"#684158","fillOpacity":0.3,"data":[[100,0.0701561700743909,0.12229000878574367],[500,0.11269251505533853,0.12501080830891928],[1000,0.07505944879501156,0.11538931219131657],[5000,0.12143452962239584,0.1357396443684896],[10000,0.07509358089862644,0.10288747785788399],[50000,0.11682510375976562,0.11682510375976562],[100000,0.09714395321505159,0.11846273623807341],[500000,0.2857049306233724,0.2857049306233724],[1000000,0.6066325553089542,0.6297072963530106],[5000000,3.8607689273485843,4.097749206874507],[10000000,7.767571496035485,8.245467986928924],[50000000,38.7718874800238,38.796590574446675],[100000000,77.68394771635333,77.72491153657636],[500000000,388.99925580275544,389.20492035826885],[1000000000,777.9642323721744,778.0336161385678]],"type":"areasplinerange","linkedTo":"line-fpb.sum.cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum.numpy","name":"fpb.sum.numpy","color":"#1c7668","data":[[100,0.010020136833190918],[500,0.008868111504448785],[1000,0.010989705721537272],[5000,0.01457267337375217],[10000,0.026676389906141493],[50000,0.050360361735026046],[100000,0.40508270263671875],[500000,0.40320251927231304],[1000000,1.452240262712751]],"type":"spline"},{"id":"range-fpb.sum.numpy","name":"fpb.sum.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.00438440994876917,0.015655863717612666],[500,0.004101808019230319,0.01363441498966725],[1000,0.005997785383294387,0.015981626059780155],[5000,0.005475058142081263,0.023670288605423077],[10000,0.00714080160903121,0.04621197820325178],[50000,-0.0013704102118419215,0.10209113368189401],[100000,0.39730353733639595,0.41286186793704155],[500000,-0.10867355418084051,0.9150785927254665],[1000000,-0.10297584147992511,3.0074563669054273]],"type":"areasplinerange","linkedTo":"line-fpb.sum.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum.dask","name":"fpb.sum.dask","color":"#3ad728","data":[[100,4.259605672624375],[500,4.109019173516168],[1000,5.5638474225997925],[5000,3.8731906149122453],[10000,5.177196078830295],[50000,3.359584519357392],[100000,11.446857452392578],[500000,11.154466397834547],[1000000,18.06905882699149]],"type":"spline"},{"id":"range-fpb.sum.dask","name":"fpb.sum.dask deviation","lineWidth":0,"color":"#3ad728","fillOpacity":0.3,"data":[[100,-0.5732216169068076,9.09243296215556],[500,-0.3452672733199975,8.563305620352333],[1000,1.0573534223137555,10.070341422885829],[5000,-0.012942987527047922,7.759324217351539],[10000,0.9102912224319581,9.444100935228631],[50000,0.20601313694451573,6.5131559017702685],[100000,10.489455578027435,12.404259326757721],[500000,10.100838894784362,12.208093900884732],[1000000,14.889402139627258,21.248715514355723]],"type":"areasplinerange","linkedTo":"line-fpb.sum.dask","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum.spark","name":"fpb.sum.spark","color":"#71b0d2","data":[[100,216.13055864969888],[500,201.4598846435547],[1000,212.05967664718625],[5000,221.374770005544],[10000,218.7413970629374],[50000,216.56777461369833],[100000,265.1914755503337],[500000,338.51122856140137]],"type":"spline"},{"id":"range-fpb.sum.spark","name":"fpb.sum.spark deviation","lineWidth":0,"color":"#71b0d2","fillOpacity":0.3,"data":[[100,207.28047830616015,224.98063899323762],[500,194.59847422697024,208.32129506013914],[1000,209.3246742328134,214.7946790615591],[5000,210.8754562495067,231.87408376158132],[10000,207.60913567322433,229.8736584526505],[50000,205.62199360875357,227.5135556186431],[100000,265.1914755503337,265.1914755503337],[500000,338.51122856140137,338.51122856140137]],"type":"areasplinerange","linkedTo":"line-fpb.sum.spark","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"1399714231450"}
|
CuPy |
Dask |
Dask CuPy |
Numpy |
Spark |
100 |
0.096 |
4.260 |
6.931 |
0.010 |
216.131 |
500 |
0.119 |
4.109 |
6.589 |
0.009 |
201.460 |
1000 |
0.095 |
5.564 |
7.343 |
0.011 |
212.060 |
5000 |
0.129 |
3.873 |
6.847 |
0.015 |
221.375 |
10000 |
0.089 |
5.177 |
6.931 |
0.027 |
218.741 |
50000 |
0.117 |
3.360 |
6.800 |
0.050 |
216.568 |
100000 |
0.108 |
11.447 |
6.763 |
0.405 |
265.191 |
500000 |
0.286 |
11.154 |
7.296 |
0.403 |
338.511 |
1000000 |
0.618 |
18.069 |
7.232 |
1.452 |
|
5000000 |
3.979 |
|
6.986 |
|
|
10000000 |
8.007 |
|
7.221 |
|
|
50000000 |
38.784 |
|
8.990 |
|
|
100000000 |
77.704 |
|
10.670 |
|
|
500000000 |
389.102 |
|
26.002 |
|
|
1000000000 |
777.999 |
|
45.081 |
|
|
{"configuration":{"chart":{"type":"scatter","polar":false,"options3d":{},"height":null,"inverted":false},"credits":{"enabled":false},"title":{"text":"Sum 2D"},"colorAxis":null,"subtitle":{"text":""},"xAxis":{"title":{"text":""},"categories":[""],"lineWidth":1,"tickInterval":null,"tickWidth":1,"plotLines":null,"labels":{"enabled":true,"formatter":""},"plotBands":null,"visible":true,"floor":2.5,"ceiling":null,"type":"logarithmic"},"yAxis":{"title":{"text":"in ms"},"categories":null,"plotLines":null,"plotBands":null,"floor":0,"ceiling":2000,"gridLineInterpolation":null},"zAxis":{"title":{"text":"in ms"}},"plotOptions":{"series":{"dataLabels":{"enabled":false,"format":null},"turboThreshold":1000},"column":{"stacking":""},"area":{"stacking":""}},"rangeSelector":{"enabled":false},"legend":{"enabled":true},"series":[{"id":"line-fpb.sum2d.dask_cupy","name":"fpb.sum2d.dask_cupy","color":"#cfd67f","data":[[100,91.22673670450847],[500,95.7498550415039],[1000,95.49371401468913],[5000,94.2690372467041],[10000,82.02441533406575],[50000,93.94160906473796],[100000,95.72752316792806],[500000,204.78049914042154],[1000000,207.8831990559896],[5000000,488.6438846588135],[10000000,853.3136049906412]],"type":"spline"},{"id":"range-fpb.sum2d.dask_cupy","name":"fpb.sum2d.dask_cupy deviation","lineWidth":0,"color":"#cfd67f","fillOpacity":0.3,"data":[[100,91.22673670450847,91.22673670450847],[500,95.7498550415039,95.7498550415039],[1000,95.49371401468913,95.49371401468913],[5000,94.2690372467041,94.2690372467041],[10000,82.02441533406575,82.02441533406575],[50000,93.94160906473796,93.94160906473796],[100000,95.72752316792806,95.72752316792806],[500000,204.78049914042154,204.78049914042154],[1000000,207.8831990559896,207.8831990559896],[5000000,488.6438846588135,488.6438846588135],[10000000,853.3136049906412,853.3136049906412]],"type":"areasplinerange","linkedTo":"line-fpb.sum2d.dask_cupy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum2d.numpy","name":"fpb.sum2d.numpy","color":"#1c7668","data":[[100,0.07962385813395183],[500,0.31534830729166663],[1000,0.6102508968777126],[5000,3.0378500620524087],[10000,5.898637771606445],[50000,29.40026919047038],[100000,58.727664947509766],[500000,294.6461041768392],[1000000,585.7833915286594]],"type":"spline"},{"id":"range-fpb.sum2d.numpy","name":"fpb.sum2d.numpy deviation","lineWidth":0,"color":"#1c7668","fillOpacity":0.3,"data":[[100,0.07390818280883991,0.08533953345906374],[500,0.3135204315185547,0.31717618306477857],[1000,0.6008196204622464,0.6196821732931789],[5000,3.0309359232584634,3.044764200846354],[10000,5.828538592452974,5.968736950759917],[50000,29.40026919047038,29.40026919047038],[100000,58.35772586315737,59.09760403186216],[500000,294.6461041768392,294.6461041768392],[1000000,583.0000899086199,588.566693148699]],"type":"areasplinerange","linkedTo":"line-fpb.sum2d.numpy","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum2d.dask","name":"fpb.sum2d.dask","color":"#3ad728","data":[[100,515.880412525601],[500,584.8424434661865],[1000,473.285018073188],[5000,637.0911995569865],[10000,532.0235506693523],[50000,733.7526480356852],[100000,709.0218575795491],[500000,962.4624252319336],[1000000,948.5526853137545]],"type":"spline"},{"id":"range-fpb.sum2d.dask","name":"fpb.sum2d.dask deviation","lineWidth":0,"color":"#3ad728","fillOpacity":0.3,"data":[[100,478.08665965334967,553.6741653978522],[500,581.8962256113688,587.7886613210043],[1000,430.67049752185767,515.8995386245183],[5000,617.6721254984537,656.5102736155192],[10000,466.26701674531915,597.7800845933855],[50000,733.7526480356852,733.7526480356852],[100000,652.975949818907,765.0677653401912],[500000,962.4624252319336,962.4624252319336],[1000000,854.1669488673022,1042.938421760207]],"type":"areasplinerange","linkedTo":"line-fpb.sum2d.dask","enableMouseTracking":false,"marker":{"enabled":false}},{"id":"line-fpb.sum2d.spark","name":"fpb.sum2d.spark","color":"#71b0d2","data":[[100,629.3064753214519],[500,644.1683769226074],[1000,650.7858435312907],[5000,742.9045041402181],[10000,782.4689547220866],[50000,1442.6485697428386],[100000,2469.5018927256265]],"type":"spline"},{"id":"range-fpb.sum2d.spark","name":"fpb.sum2d.spark deviation","lineWidth":0,"color":"#71b0d2","fillOpacity":0.3,"data":[[100,615.1579221089683,643.4550285339355],[500,644.1683769226074,644.1683769226074],[1000,650.7858435312907,650.7858435312907],[5000,742.9045041402181,742.9045041402181],[10000,782.4689547220866,782.4689547220866],[50000,1442.6485697428386,1442.6485697428386],[100000,2469.5018927256265,2469.5018927256265]],"type":"areasplinerange","linkedTo":"line-fpb.sum2d.spark","enableMouseTracking":false,"marker":{"enabled":false}}],"tooltip":{"enabled":true,"useHTML":true,"headerFormat":"<span style=\"color:{series.color}\">{series.name}</span><table><tbody>","pointFormat":"<tr><th>Time:</th><td>{point.y:,.2f}ms</th></tr><tr><th>Size:</th><td>{point.x}</th></tr>","footerFormat":"</tbody></table>","shared":false,"outside":false,"valueDecimals":null,"split":false}},"hc_type":"chart","id":"1399714231450589"}
|
CuPy |
Dask |
Dask CuPy |
Numpy |
Spark |
100 |
0.103 |
515.880 |
91.227 |
0.080 |
629.306 |
500 |
0.134 |
584.842 |
95.750 |
0.315 |
644.168 |
1000 |
0.101 |
473.285 |
95.494 |
0.610 |
650.786 |
5000 |
0.129 |
637.091 |
94.269 |
3.038 |
742.905 |
10000 |
0.249 |
532.024 |
82.024 |
5.899 |
782.469 |
50000 |
0.270 |
733.753 |
93.942 |
29.400 |
1442.649 |
100000 |
2.395 |
709.022 |
95.728 |
58.728 |
2469.502 |
500000 |
3.215 |
962.462 |
204.780 |
294.646 |
|
1000000 |
19.542 |
948.553 |
207.883 |
585.783 |
|
5000000 |
31.483 |
|
488.644 |
|
|
10000000 |
63.104 |
|
853.314 |
|
|
Assumptions
- As I played with a single host we cannot appreciate the real benefits of theses frameworks
- We observe a minimum overhead of 6ms from CuPy to Dask+CuPy
- PySpark has an overhead of 200ms making it unsuitable for our tests
- More, PySpark doesn't seems to handle memory as good as could do Vanilla Python
Of course, PySpark is here just for the experimentation, in my mind the small implementation that I used isn't representative of a real usage. Spark is clearly in the big data field and even handling of 1 trillion items would be common tasks. Furthermore, a single host Spark is ...hum.. a joke.
Here my GPU has 4 times less RAM than my CPU but we can see that it can handle 1,000 times more data, from 1M to 1G. With the multi-dimensionnal advantage, we can conclude without doubt the superiority of GPU. But due to its price, another question comes:
From our results, Numpy compared to GPU solutions doesn't have bad performance, the real problem here is memory allocation. There is just not enough RAM to run the test until unhooking. 2D and complex operations such as sine are slower but acceptable. At this point we can say that 1D arithmetics with less than 1M datapoints seems to be the most adapted workloads.
These basic operations can't reflect perfectly an end usage as could do a real machine learning framework, FPB's goal is to understand performance of these tasks. A future machine learning benchmark will fill this target.