- R High Performance Programming
- Aloysius Lim William Tjhi
- 206字
- 2021-08-06 19:17:06
R is single-threaded
Another way in which R is CPU limited is that, by default, it runs only on a single thread on the CPU. It does not matter if you install R on a powerful server with 64 CPU cores, R will only use one of them. For example, finding the sum of a numeric vector is an operation that can be made to run in parallel in the CPU quite easily. If there are four CPU cores available, each core can be given roughly one quarter of the data to process. Each core computes the subtotal of the chunk of data it is given, and the four subtotals are then added up to find the total sum of the whole dataset. However in R, the sum()
function runs serially, processing the entire dataset on one CPU core. In fact, many Big Data operations are of a similar nature to the summation example here, with the same task running independently on many subsets of data. In such a scenario, performing the operation sequentially would be an underuse of today's mostly parallel computing architectures. In Chapter 8, Multiplying Performance with Parallel Computing, we will learn how to write parallel programs in R to overcome this limitation.
- SQL Server 從入門到項目實踐(超值版)
- Redis入門指南(第3版)
- C++ Builder 6.0下OpenGL編程技術
- Oracle Database In-Memory(架構與實踐)
- Java:Data Science Made Easy
- 教孩子學編程:C++入門圖解
- Windows Forensics Cookbook
- Mastering Drupal 8 Views
- 大數(shù)據(jù)分析與應用實戰(zhàn):統(tǒng)計機器學習之數(shù)據(jù)導向編程
- Visual Basic程序設計上機實驗教程
- SSM開發(fā)實戰(zhàn)教程(Spring+Spring MVC+MyBatis)
- 編寫高質量代碼:改善Objective-C程序的61個建議
- 單片機原理及應用技術
- Vue.js光速入門及企業(yè)項目開發(fā)實戰(zhàn)
- C#程序設計基礎入門教程