MulaiMulai sekarang secara gratis

Memory profile of parLapply()

You are calculating correlations between stock prices of tech companies. You have a list of data frames ls_stocks. Each data frame contains weekly stock price data. You want to apply a function, calc_cor() to each element of ls_stocks using parLapply(). You decided to profile your code using profvis() to check on the memory usage.

This is the output you get:

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.

Which of the following options are true?

Latihan ini adalah bagian dari kursus

Parallel Programming in R

Lihat Kursus

Latihan interaktif praktis

Ubah teori menjadi tindakan dengan salah satu latihan interaktif kami.

Mulai berolahraga