Last active
August 29, 2023 09:00
-
-
Save nicebread/6920c8287d7bffb03007 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These code snippets have been tested on R 3.1.0 and Mac OS 10.9.3. They presumably do *not* work on R 2.X! | |
## Enter these commands in the Mac OS Terminal | |
# use faster vecLib library | |
cd /Library/Frameworks/R.framework/Resources/lib | |
ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib libRblas.dylib | |
# return to default settings | |
cd /Library/Frameworks/R.framework/Resources/lib | |
ln -sf libRblas.0.dylib libRblas.dylib | |
# R script for benchmarking: | |
# http://r.research.att.com/benchmarks/R-benchmark-25.R | |
# On 2011 Macbook Pro (2.7 GHz Core i7): 43 sec. (Rblas) vs. 9 sec. (vecLib) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cuz macOS 12.0.1 has removed
libBLAS.dylib
from/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/
so another way to speed up matrix calculation in R is use openblas
so if Homebrew has been installed in your Mac, pls try:
then check the dir
if there is a
libopenblas.dylib
in this dir,sorry for my poor English...