IPyston 2 ukuqaliswa kwePython nge-JIT compiler

Ngemuva kweminyaka emithathu yentuthuko, ukwethulwa kwephrojekthi yePyston 2 kushicilelwe, ngithuthukise iniekusetshenzisweni kokusebenza okuphezulu kolimi lwePython kusetshenziswa intuthuko yephrojekthi ye-LLVM.

Ukuqaliswa ivelela ukusetshenziswa kobuchwepheshe besimanje bokuhlanganiswa kweJIT futhi ihlose ukufeza ukusebenza okuphezulu okufana nezilimi zesistimu yendabuko njenge-C ++.

Ikhodi evela kuzinguqulo ezedlule nguPyston yasatshalaliswa ngaphansi kwelayisense le-Apache, kepha ikhodi yePyston 2 ayikatholakali futhi kukhishwa kuphela ukwakha okulungele ukusetshenziswa kwe-Ubuntu 18.04 kanye ne-20.04 (ifayela elinekhodi liyatholakala ukulanda kepha kunesikhuni esinolwazi kuphela ukuthi iphrojekthi isavaliwe).

Ukushicilela ikhodi kuyingxenye yezinhlelo zonjiniyelakepha lokhu kuzokwenziwa ngemuva kokuthi ukwakheka kwemodeli yebhizinisi sekuqediwe yenkampani entsha futhi kwathathwa isinqumo sokuqhubeka nokuthuthukisa iPyston ngaphandle kokuxhaswa kwezezimali kweDropbox.

Mayelana nePyston 2

Ngokungafani nezinguqulo zangaphambilini, IPyston 2 iphawulwe ngokuzinza hhayi njengenguqulo yesilingo. Umsebenzi omningi wenziwe ukwandisa ukusebenza futhi iPyston 2 manje ishesha ukwedlula eyangempela Python 3.8 cishe ngama-20% lapho kudluliswa i-python-macrobenchmarks test suite.

Izinzuzo zokusebenza eziphawuleka kakhulu zibonwa kwimithwalo yemisebenzi yohlelo lokusebenza lwewebhu. Ekuvivinyweni okuhlukile okufana ne- chaos.py ne-nbody.py, iPyston 2 idlula iPython 3.8 ngesici esingu-2. Izindleko zokusebenzisa i-JIT zikhuphuke kancane ekusetshenzisweni kwememori.

Sijabule kakhulu ukukhipha iPyston v2, ukuqaliswa okusheshayo nokuhambisana kakhulu kolimi lokuhlela lwePython. I-Version 2 ishesha ngama-20% kunePython 3.8 ejwayelekile kuma-macrobenchmarks ethu. Okubaluleke kakhulu, kungenzeka isheshe ikhodi yakho. IPyston v2 inganciphisa izindleko zeseva, inciphise ama-latency womsebenzisi, futhi ithuthukise umkhiqizo wonjiniyela.

IPyston v2 kulula ukuyisebenzisa, ngakho-ke uma ufuna ukusebenza okungcono kwePython, sincoma ukuthi uthathe imizuzu emihlanu bese uzama iPyston. Ukwenza kanjalo kungenye yezindlela ezilula zokusheshisa iphrojekthi yakho.

Ngokuya ngokuhambisana ngePython yomdabu, iphrojekthi yasePyston kuthathwa njengokuqaliswa okunye okuhambisana kakhulu kwe-CPython, ngoba iPyston iyimfoloko yekhodi enkulu ye-CPython.

UPyston isekela yonke imisebenzi ye-CPython, kufaka phakathi i-C API yokuthuthukisa izandiso ze-C. IPyston ekuqaleni yathuthukiswa yiDropbox, okwathi ngo-2017 yanquma ukuyeka ukuthuthukiswa kwangaphakathi. Ekuqaleni kuka-2020, abathuthukisi abaphambili bakaPyston basungula inkampani yabo, bavuselela kabusha iphrojekthi, baqala ukusebenza ePyston ngokugcwele.

Imininingwane yobuchwepheshe ekugoqelweni kwePyston 2 ayikanikezwa okwamanje, kuphela i-DynASM JIT, i-inline caching, kanye nokwenza kahle okujwayelekile kwe-CPython. Uhlobo lwangaphambilini lwePyston lusebenzise indlela eyodwa ye-JIT ngasikhathi sinye, efana ne-JIT ezinjinini zesimanje zeJavaScript.

Ku-JIT, ikhodi yePython idlulisiwe yahunyushwa ukumelwa okuphakathi LLVM (IR, ukumelwa okuPhakathi). Ngaphezu kwalokho, ukumelwa kwe-IR kwakucutshungulwa ku-LLVM optimizer kwadluliselwa enjinini ye-LLVM JIT ukuze kwenziwe, okuguqula ukumelwa kwe-IR kwaba yikhodi yomshini.

Ukuthola imininingwane ngezinhlobo eziguqukayo zezinhlelo ngolimi olunamandla lwePython, inqubo yokuqagela okungenzeka kwezinhlobo zezinto yasetshenziswa, kwalandelwa ukucaciswa kokukhetha okulungile kohlobo ngenkathi kwenziwa.

Ngakho-ke, iPyston ihlale ihlukahluka ukwenziwa phakathi kwamagatsha amabili: ukushesha, lapho amanani abikezelwayo eqinisekiswa, kanye nokuhamba kancane, okusetshenziswa uma kwenzeka ukungafani kohlobo oluthile.

Umsebenzi ungenziwa ngemodi efundwayo eminingi, ukuvumela ukwenziwa okufanayo kwemicu eminingi yekhodi ngolimi lwePython futhi kukhululeke kukhiye wokuhumusha womhlaba jikelele (GIL).

Okokugcina uma ufuna ukwazi kabanzi ngayo, ungabheka imininingwane kufayela le- isixhumanisi esilandelayo.


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Yiba ngowokuqala ukuphawula

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe. Ezidingekayo ibhalwe nge *

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.