☰
Debian Codegraph
@
0.7.0+dfsg-1
/
/
R
/
capableOfProfmem.R
☽
☼
R/capableOfProfmem.R
code
plain
raw
LGPL-2.1
2016-2018 Henrik Bengtsson
debian/copyright
1
# A lookup-only-once version of capabilities("profmem")
2
# Benchmarking shows it's 8-10 times faster this way.
3
capableOfProfmem <- local({
4
res <- NA
5
function() {
6
if (is.na(res)) {
7
res <<- capabilities("profmem")
8
}
9
res
10
}
11
})