PCDVD¼Æ¦ì¬ì§Þ°Q½×°Ï
PCDVD¼Æ¦ì¬ì§Þ°Q½×°Ï   µù¥U ±`¨£°ÝÃD ¼Ð°O°Q½×°Ï¬°¤wŪ

¦^¨ì   PCDVD¼Æ¦ì¬ì§Þ°Q½×°Ï > ¨ä¥L¸s²Õ > ºÃÃøÂø¯g°Ï
±b¤á
±K½X
 

¦^À³
 
¥DÃD¤u¨ã
sparc10
Junior Member
 
sparc10ªº¤jÀY·Ó
 

¥[¤J¤é´Á: Jun 2003
±zªº¦í§}: CC BY-NC-ND 4.0±ÂÅv
¤å³¹: 730
Exclamation ½Ð°Ý¡AÃö³¬webassembly-baseline¡Btiering¤~¯à¶}û£Chrome V8ªºTurboFan¡H

½Ð°Ý¡AÃö³¬webassembly-baseline¡Btiering¤~¯à¶}û£Chrome V8ªºTurboFan¡H

Q1¡G
·í§Ú¶i¤Jedge://flags/¦Z¡A§Ú»Ý­nÃö³¬webassembly-baseline¡Btiering³o¤GªÌ¤~¯à¶}û£V8ªºTurboFan¡H
#enable-webassembly-baseline
#enable-webassembly-tiering

Q2¡G
¦pªG§Ú·Q¥u¨Ï¥ÎV8ªºLiftoff¡A¬O§_­nû£°Êwebassembly-baseline¡Btiering³o¤GªÌ¡H

ÁÂÁ¤j®a¡C
     
      
ÂÂ 2024-06-07, 02:10 PM #1
¦^À³®É¤Þ¥Î¦¹¤å³¹
sparc10Â÷½u¤¤  
substar999
Senior Member
 

¥[¤J¤é´Á: Sep 2001
±zªº¦í§}: K
¤å³¹: 1,473
CharGPT¦^À³¦p¤U¡A´N¬Ý¬O¤£¬O±z­nªºµª®×

¦p¦ó±Ò¥ÎChrome V8ªºturbofan½sĶ¾¹?

ChatGPT
Chrome V8 ªº TurboFan ¬O¤@­Ó¦Û°ÊÀu¤Æ½sĶ¾¹¡A·í JavaScript ¥N½Xº¡¨¬¯S©w±ø¥ó®É¡A¦p¬Y­Ó¨ç¼Æ³QÀWÁc°õ¦æ¨¬°÷¦h¦¸¡A³Q»{¬°¬O¡§¼öÂI¡¨®É¡ATurboFan ·|¦Û°ÊIJµo¡C¦b V8 ªº³Ì·sª©¥»¤¤¡A¨Ã¨S¦³ª½±µªº¼Ð»x©Î¶}ÃöÅý¥Î¤á±Ò¥Î TurboFan¡F¥¦¬O V8 ªº¦Û¾AÀ³Àu¤Æ¬yµ{ªº¤@³¡¤À¡A¸Ó¬yµ{¥]¬A Ignition ¸ÑÄÀ¾¹©M TurboFan Àu¤Æ½sĶ¾¹¡C

¦ý¬O¡A¹ï©ó§Æ±æ¹êÅç©Î±j¨îÀu¤Æªº¶}µoªÌ¡A§A¥i¥H¨Ï¥Î¤@¨Ç Chrome ¼Ð»x¨Ó½Õ¾ã V8 ªº¦æ¬°©ÎÆ[¹î TurboFan ¦p¦ó»P§Aªº JavaScript ¥N½X¥æ¤¬¡C¥H¤U¬O±`¥Îªº¤èªk¡G

¥´¶} Chrome ªº¼Ð»x­¶­±¡G¦b§Aªº Chrome ÂsÄý¾¹¤¤¾É¯è¨ì chrome://flags¡C³o­Ó­¶­±¤¹³\§A±Ò¥Î Chrome ªº¹êÅç©Ê¥\¯à¡C

·j¯Á JavaScript ¬ÛÃö¼Ð»x¡G¬d§ä»P JavaScript ©Î V8 ¬ÛÃöªº¼Ð»x¡A¬Ý¬Ý¬O§_¦³¥ô¦ó¹êÅç©Ê¥\¯à©Î³]¸m¥i¥H±Ò¥Î¡A³o¨Ç¥i¯à·|¼vÅT TurboFan ¦p¦óÀu¤Æ§Aªº¥N½X¡C½Ðª`·N³o¨Ç¼Ð»x¥i¯à·|ÀHµÛ Chrome ª©¥»ªº¤£¦P¦Ó§ïÅÜ¡A¨Ã¥i¯à¼vÅTÂsÄý¾¹ªºÃ­©w©Ê©Î©Ê¯à¡C

¨Ï¥Î Chrome ªº DevTools ¶i¦æ¤ÀªR¡G§A¥i¥H¨Ï¥Î Chrome DevTools ¨Ó¤ÀªR§Aªº JavaScript¡A¨Ã¬Ý¨ì V8 ¦p¦óÀu¤Æ§Aªº¥N½X¡C³o¥i¥HÀ°§U§A¤F¸Ñ TurboFan ¦ó®É¥H¤Î¦p¦ó½sĶ§Aªº JavaScript ¨ç¼Æ¡C

¤â°ÊÀu¤Æ´£¥Ü¡GÁöµM§A¤£¯à¡§¶}±Ò¡¨ TurboFan¡A¦ý§A¥i¥H¥H§ó¦³§Q©óÀu¤Æªº¤è¦¡½s¼g§Aªº JavaScript¡CÁקK¦b¼öÂI¨ç¼Æ¤¤¨Ï¥Î¬Y¨Çªý¤îÀu¤Æªº½s½X¹ê½î¡]¦p¨Ï¥Î try-catch ¶ô¡^¥i¥H½T«O TurboFan §ó¦³¥i¯àÀu¤Æ§Aªº¨ç¼Æ¡C

Node.js ¼Ð»x¡G¦pªG§A¦b Node.js Àô¹Ò¤¤¤u§@¡A§A¥i¥H¨Ï¥Î V8 ¼Ð»x±Ò°Ê Node.js ¶iµ{¨Ó±±¨îÀu¤Æ¦æ¬°¡A¨Ò¦p¨Ï¥Î --trace_opt --trace_deopt ¨Ó¬d¬Ý¨ç¼Æ¦ó®É³QÀu¤Æ©Î¥hÀu¤Æ¡A³o¦³§U©ó¤F¸Ñ TurboFan ªº¬¡°Ê¡C

³q¹L¨Ï¥Î³o¨Ç¤u¨ã©M§Þ³N¡A§A¥i¥H¹ï V8 ©M TurboFan ¦p¦óºÞ²z§Aªº JavaScript ¥N½XªºÀu¤Æ¦³¤@©wµ{«×ªº±±¨î©M¬}¹î¡C



¤]´N¬O»¡³o­Ó½sĶ¾¹¸òwebassembly-baseline¡BtieringµLÃö?

ChatGPT
TurboFan ©M WebAssembly ªº°ò½u½sĶ¾¹¡]¦p Liftoff¡^¥H¤Î¤À¼hÀu¤Æµ¦²¤¡]tiering¡^¦³Ãö¡A¦ý¥¦­Ì°w¹ïªº¬O¤£¦Pªº¥Ø¼Ð©M§Þ³N¼h­±¡C

TurboFan¡G³o¬O V8 ªº JavaScript Àu¤Æ½sĶ¾¹¡A¥D­n¥Î©ó¹ï JavaScript ¥N½X¶i¦æÀu¤Æ¡C¥¦¬O V8 ¤ÞÀº¤¤ªº¤@³¡¤À¡A­t³d°ª©Ê¯àªº JIT¡]Just-In-Time¡^½sĶ¡C·í JavaScript ¨ç¼Æ³QÀWÁc°õ¦æ¨Ã³Q¼Ð°O¬°¡§¼öÂI¡¨®É¡ATurboFan ·|³QIJµo¨Ó¶i¦æ²`«×Àu¤Æ¡C

WebAssembly °ò½u½sĶ¾¹¡]¦p Liftoff¡^¡G³o¬O°w¹ï WebAssembly ¥N½Xªº¡A¥Î©ó§Ö³t¥Í¦¨¾÷¾¹¥N½X¡A¥H«K¥N½X¥i¥H¥ß§Y°õ¦æ¡A¦ý¥i¯à¤£¬O³ÌÀu¤Æªº¥N½X¡C³o¥D­n¬O¬°¤F§Ö³t±Ò°Ê©M²Ä¤@¦¸°õ¦æ©Ê¯à¡C

¤À¼hÀu¤Æ¡]Tiering¡^¡G³o¬O V8 ¥Î©ó WebAssembly ªº§Þ³N¡A¨ä¤¤¥]¬A¨Ï¥Î°ò½u½sĶ¾¹§Ö³t½sĶ¡AÀH«á¦b»Ý­n®É¥Ñ§ó°ª¯Åªº½sĶ¾¹¡]¦p TurboFan¡^¶i¦æ­«·s½sĶ¥H¶i¦æ§ó²`«×ªºÀu¤Æ¡C³oºØµ¦²¤¤¹³\¦b¤£Ä묹±Ò°Ê©Ê¯àªº±¡ªp¤U³v¨B´£¤É¥N½Xªº°õ¦æ®Ä²v¡C

¦b V8 ¤¤¡AJavaScript ©M WebAssembly ¤À§O³Q¬Ý«Ý©MÀu¤Æ¡A§Y¨Ï¥¦­Ì¥i¯à¦@¨É¬Y¨Ç°ò¦¬[ºc¦p TurboFan¡C¹ï©ó JavaScript¡ATurboFan ¦Û°Ê³B²zÀu¤Æ¡F¹ï©ó WebAssembly¡A«h¥i¯à¯A¤Î°ò½u©M¤À¼h½sĶµ¦²¤¡A¥H¥­¿Å±Ò°Ê©Ê¯à©M°õ¦æ®Ä²v¡C这·N¨ýþÓ¡A¾¨ºÞ TurboFan ¥i¥H¥Î©ó WebAssembly ªº¤G¦¸Àu¤Æ¡A¦ý¨ä®Ö¤ß¥\¯à©M³ÌªìªºÀ³¥ÎµJÂI¬O°w¹ï JavaScript ªºÀu¤Æ¡C


¦pªG§Ú·Q¥u¨Ï¥ÎV8ªºLiftoff¡A¬O§_­nû£°Êwebassembly-baseline¡Btiering³o¤GªÌ¡H

ChatGPT
¦b V8 ¤ÞÀº¤¤¡A¦pªG§A·Q¥u¨Ï¥Î WebAssembly ªº Liftoff °ò½u½sĶ¾¹¦Ó¤£¶i¤J§ó°ª¼h¦¸ªºÀu¤Æ¡A§A¥i¥H¦Ò¼{¸T¥Î¤À¼h½sĶ¡]tiering¡^¡A±q¦Ó¨Ï V8 ¤ÞÀº¥u¨Ï¥Î Liftoff ¨Ó½sĶ©M°õ¦æ WebAssembly ¥N½X¡C

¦p¦ó³]¸m
§A¥i¥H³q¹L±Ò°Ê°Ñ¼Æ¨Ó°t¸m V8 ªº WebAssembly ½sĶ¾¹¦æ¬°¡C¥H¤U¬O¤@¨Ç¥i¯àªº¿ï¶µ¡G

¸T¥Î¤À¼h½sĶ¡G¦pªG§A·QÅý V8 ¶È¨Ï¥Î Liftoff ½sĶ WebAssembly ¥N½X¡A§A¥i¥H¦b±Ò°Ê Chrome ©Î Node.js ®É¥[¤W --wasm-tier-up=false ªº°Ñ¼Æ¡C³o¼Ë³]¸m¥i¥H¨¾¤î±q°ò½u½sĶ¾¹ Liftoff ¤Á´«¨ì§ó°ª¼h¦¸ªºÀu¤Æ½sĶ¾¹¡A¦p TurboFan¡C

±Ò°Ê°Ñ¼Æ³]¸m½d¨Ò¡G

¦b Node.js ¤¤¡A§A¥i¥H³o¼Ë±Ò°Êµ{§Ç¡G

node --wasm-tier-up=false your-script.js

¦b Chrome ¤¤¡A§A»Ý­n±Ò°Ê®É¥[¤J¬Û¦Pªº¼Ð»x¡G

chrome --js-flags="--wasm-tier-up=false"


ª`·N¨Æ¶µ
©Ê¯à¦Ò¼{¡G¨Ï¥Î¥u¦³ Liftoff ªºµ¦²¤±NÀu¤Æ§Ö³t±Ò°Ê®É¶¡¡A¦ý¥i¯à·|¹ïªø´Á¹B¦æªº®Ä¯à²£¥Í¤£§Q¼vÅT¡A¦]¬° Liftoff ªº½sĶ¥N½X¤£¦p TurboFan ¶i¦æªºÀu¤Æ¨º»ò²`¤J¡C

¾A¥Î±¡ªp¡G³oºØ³]¸m¾A¥Î©ó»Ý­n§Ö³tÅTÀ³¥B°õ¦æ®É¶¡¤£ªøªºÀ³¥Î³õ´º¡A©ÎªÌ·í§A¦b¶}µo¹Lµ{¤¤·Q­n´ú¸Õ©M¤ÀªR°ò½u½sĶ¾¹ªº¦æ¬°®É¡C

³q¹L¤W­z³]¸m¡A§A¥i¥H¹ê²{±±¨î V8 ¹ï WebAssembly ¥N½Xªº³B²z¤è¦¡¡A±Mª`©ó¨Ï¥Î Liftoff ¦Ó¤£±Ò¥Î¶i¤@¨Bªº½sĶÀu¤Æ¡C
 

¦¹¤å³¹©ó 2024-06-07 03:56 PM ³Q substar999 ½s¿è.
ÂÂ 2024-06-07, 03:51 PM #2
¦^À³®É¤Þ¥Î¦¹¤å³¹
substar999Â÷½u¤¤  
sparc10
Junior Member
 
sparc10ªº¤jÀY·Ó
 

¥[¤J¤é´Á: Jun 2003
±zªº¦í§}: CC BY-NC-ND 4.0±ÂÅv
¤å³¹: 730
ÁÂÁÂsubstar999¡I
§Úªºµ²½×¬O¡GÃö³¬#enable-webassembly-baseline¡A¶}û£#enable-webassembly-tiering¡A´N¯àû£°ÊChrome V8ªºTurboFan¡C



§Ú°Ý¡G
¦pªGÃö³¬#enable-webassembly-baseline¡A´N¯à¶}û£Chrome V8ªºTurboFan¡H
Copilot¦^µª¡G
¬Oªº¡A§A¥i¥H³z¹LÃö³¬ ¨Ó¶}±Ò Chrome V8 ªº TurboFan#enable-webassembly-baseline12¡C

¦b V8 ¤¤¡AWebAssembly ªº½sĶºÞ½u¥]§t¨â­Ó¥D­nªº½sĶ¾¹¡GLiftoff ©M TurboFan12¡C Liftoff ¬O¤@­Ó°ò½u½sĶ¾¹¡A¥¦¯à°÷§Ö³t¦a²£¥Í¾÷¾¹½X¡A¦ý¥u¯à®M¥Î¤Ö¼Æ³Ì¨Î¤Æ12¡C ¦Ó TurboFan ¬O¤@­Ó³Ì¨Î¤Æ½sĶ¾¹¡A¥¦¯à°÷¶i¦æ¦h¦¸½sĶ¡A¨Ã³z¹L«Ø¥ß¦h­Ó¤º³¡ªí¥Ü¨Ó¶i¦æ³Ì¨Î¤Æ©M§ó¦nªº¼È¦s¾¹°t¸m¡A±q¦Ó²£¥Í©úÅã§ó§Öªºµ{¦¡½X12¡C

¦b Chrome ¤¤¡A§A¥i¥H³z¹L°±¥Î ©M ¨Ó¥u¨Ï¥Î TurboFan ½sĶ WebAssembly µ{¦¡½Xchrome://flags/#enable-webassembly-tieringchrome://flags/#enable-webassembly-baseline12¡C ³o¼Ë¡A©Ò¦³ªº WebAssembly ¨ç¦¡³£·|¨Ï¥Î TurboFan ¶i¦æ½sĶ¡A¦Ó¤£¬O Liftoff12¡C ³o¹ï©ó»Ý­n¶i¦æ¤j¶q­pºâªº WebAssembly µ{¦¡¥i¯à·|¦³©ÒÀ°§U¡A¦]¬° TurboFan ¯à°÷²£¥Í§ó§Öªºµ{¦¡½X12¡C µM¦Ó¡A½Ðª`·N¡A³o¥i¯à·|¾É­P½sĶ®É¶¡¼W¥[12¡C ¦]¦¹¡A¦pªG§Aªº WebAssembly µ{¦¡»Ý­n§Ö³t±Ò°Ê¡A¨º»ò¥i¯àÁÙ¬O»Ý­n¨Ï¥Î Liftoff12¡C


§Ú°Ý¡G
¦pªGÃö³¬#enable-webassembly-tiering¡A´N¯à¶}û£Chrome V8ªºTurboFan¡H
Copilot¦^µª¡G
Chrome V8ªºTurboFanÀu¤Æ½sĶ¾¹©MLiftoff°ò½u½sĶ¾¹³£¥Î©ó±NWebAssembly¥N½X½sĶ¬°¥i¥H°õ¦æªº¾÷¾¹¥N½X1¡C ¦bChromeªº·í«e°t¸m¤¤¡A¤@­ÓWebAssembly¼Ò²Õ­º¥ý§¹¥þ¥ÑLiftoff½sĶ¡C Liftoff½sĶ§¹¦¨«á¡A¾ã­Ó¼Ò²Õ·|¥ß§Y¦b«á¥x¦A¦¸¥ÑTurboFan½sĶ1¡C

Ãö³¬¨Ã¤£·|Ãö³¬TurboFan¡C ¹ê»Ú¤W¡A³o­Ó¼Ð»x¬O¥Î¨Ó±Ò¥Î©Î¸T¥Î°ÊºA¤À¼hªº#enable-webassembly-tiering1¡C °ÊºA¤À¼h¥u·|¹ï¹ê»Ú°õ¦æ¦h¦¸ªº¨ç¼Æ¶i¦æTurboFan½sĶ1¡C ³o¼Ë¥i¥H´î»´CPUªº­t¸ü¡A±q¦Ó¤¹³\°£WebAssembly½sĶ¤§¥~ªº±Ò°Ê¥ô°È§ó¦h¦a¨Ï¥ÎCPU1¡C

©Ò¥H¡A§Y¨Ï§AÃö³¬¤F¡ATurboFanÀu¤Æ½sĶ¾¹¤´µM·|¦b«á¥x¤u§@¡C ¦ý¬O¡A¥¦¥i¯à¤£·|¥ß§Y½sĶ©Ò¦³ªº¨ç¼Æ¡A¦Ó¬Oµ¥¨ì¨ç¼Æ³Q¦h¦¸°õ¦æ®É¤~¶i¦æ½sĶ#enable-webassembly-tiering1¡C ³oºØ¤è¦¡¥i¥H´£°ª±Ò°Ê³t«×¡A¦P®É¾¨§Ö´£¨Ñ°ª®p©Ê¯à1¡C §Æ±æ³o­Ó¸ÑÄÀ¹ï§A¦³©Ò説©ú¡I

¦¹¤å³¹©ó 2024-06-07 08:05 PM ³Q sparc10 ½s¿è.
ÂÂ 2024-06-07, 07:57 PM #3
¦^À³®É¤Þ¥Î¦¹¤å³¹
sparc10Â÷½u¤¤  
sparc10
Junior Member
 
sparc10ªº¤jÀY·Ó
 

¥[¤J¤é´Á: Jun 2003
±zªº¦í§}: CC BY-NC-ND 4.0±ÂÅv
¤å³¹: 730
§Úªº·sµ²½×¬O¡G
±Ò¥Î#enable-webassembly-baseline¡A
¸T¥Î #enable-webassembly-tiering¡A
¸T¥Î #Lazy compilation¡A´N¯à¡§³æ¿W¦a¡¨û£°ÊChrome V8ªºLiftoff¡C



¤Þ¥Î¦Û¡G
https://v8.dev/docs/wasm-compilation-pipeline
¡i¾÷¾¹Â½Ä¶¡jWebAssembly ½sĶºÞ¹D

1¡B¶ÈLiftoff¡G
¦b Chrome ¤¤¡A¸T¥Î WebAssembly ¤À¼h ¡]chrome://flags/#enable-webassembly-tiering ¡^ ¨Ã±Ò¥Î WebAssembly °ò·Ç½sĶ¾¹ ¡] chrome://flags/#enable-webassembly-baseline ¡^¡C

¸T¥Î Lazy compilation: ©µ¿ð½sĶ¡] chrome://flags/#enable-webassembly-lazy-compilation ¡^¡C


2¡B¶È­­ TurboFan¡G
¦b Chrome ¤¤¡A¸T¥Î WebAssembly ¤À¼h ¡] chrome://flags/#enable-webassembly-tiering ¡^ ¨Ã¸T¥Î WebAssembly °ò·Ç½sĶ¾¹ ¡] chrome://flags/#enable-webassembly-baseline ¡^¡C

±Ò¥ÎLazy compilation: ©µ¿ð½sĶ¡G
¦b Chrome ¤¤¡A±Ò¥Î WebAssembly ©µ¿ð½sĶ ¡] chrome://flags/#enable-webassembly-lazy-compilation ¡^¡C

¦¹¤å³¹©ó 2024-09-08 01:45 PM ³Q sparc10 ½s¿è.
ÂÂ 2024-09-07, 10:54 AM #4
¦^À³®É¤Þ¥Î¦¹¤å³¹
sparc10Â÷½u¤¤  
sparc10
Junior Member
 
sparc10ªº¤jÀY·Ó
 

¥[¤J¤é´Á: Jun 2003
±zªº¦í§}: CC BY-NC-ND 4.0±ÂÅv
¤å³¹: 730
§Ú²{¦bı±o³o¨Ç­nºû«ù¦b¹w³]­È¡G
#enable-webassembly-baseline¡B#enable-webassembly-tiering

¦ý¥i¥Hû£°Ê¡G
#enable-experimental-webassembly-features¡B#enable-webassembly-lazy-compilation¡B#enable-javascript-experimental-shared-memory¡C
ÂÂ 2024-09-22, 06:00 PM #5
¦^À³®É¤Þ¥Î¦¹¤å³¹
sparc10Â÷½u¤¤  


¦^À³


POPIN
¥DÃD¤u¨ã

µoªí¤å³¹³W«h
±z¤£¥i¥Hµo°_·s¥DÃD
±z¤£¥i¥H¦^À³¥DÃD
±z¤£¥i¥H¤W¶Çªþ¥[ÀÉ®×
±z¤£¥i¥H½s¿è±zªº¤å³¹

vB ¥N½X¥´¶}
[IMG]¥N½X¥´¶}
HTML¥N½XÃö³¬



©Ò¦³ªº®É¶¡§¡¬°GMT +8¡C ²{¦bªº®É¶¡¬O12:26 AM.


vBulletin Version 3.0.1
powered_by_vbulletin 2024¡C