Make sure you are on a system with WebMetal enabled. In Safari, first make sure the Developer Menu is visible (Preferences → Advanced), then Develop → Experimental Features → Enable WebGPU. If in Safari Technology Preview, Enable WebMetal instead.
選択した要素数の配列をCPUとGPUでそれぞれソートし、実行時間を比較します。