開始使用免費開始

parLapply() 的記憶體剖析

你正在計算多家科技公司股價之間的相關係數。你有一個資料框清單 ls_stocks,每個資料框都包含每週的股價資料。你想用 parLapply() 把函式 calc_cor() 套用到 ls_stocks 的每個元素。你決定用 profvis() 來剖析程式碼,以檢查記憶體使用情況。

以下是你得到的輸出:

A profiling output for the parallel application of a function to an input list using parLapply(). The parallel code uses six cores. Most of the memory, 389.2 megabytes, and time, 4320 milliseconds, is taken by the parLapply() call.

以下哪些選項是正確的?

本練習屬於課程

R 平行程式設計

檢視課程

動手互動練習

將理論付諸實踐,立即體驗我們的互動練習

開始練習