Blog Archives

How large vectors in R might be stored compactly

April 30, 2015
By
How large vectors in R might be stored compactly

Vectors in R can currently have elements of two sizes — 8-byte double-precision floating-point elements for `numeric’ vectors, or 4-byte elements for `integer’ or `logical’ vectors.  You can also have vectors whose elements are 1-byte `raw’ values, but these raw vectors don’t support negative numbers, or NA values, so they aren’t suitable for general use. It seems that lots of

Read more »

Subset replacement in pqR: Now faster and better

October 13, 2014
By
Subset replacement in pqR: Now faster and better

The latest version of pqR that I just released uses a new way of implementing subset replacement operations — such as a<-1 or L$M<-v. The new approach is much faster, and eliminates some strange behaviour of the previous approach. This change affects only interpreted code. The bytecode compiler (available since R-2.13.0) introduced a different mechanism, which is

Read more »

New version of pqR with faster variable lookup, faster subset replacement, and more

October 6, 2014
By
New version of pqR with faster variable lookup, faster subset replacement, and more

I’ve released a new version, pqR-2014-09-30, of my speedier, “pretty quick”, implementation of R, with some major performance improvements, and some features from recent R Core versions. It also has fixes for bugs (some also in R-3.1.1) and installation glitches. Details are in pqR NEWS. Here I’ll highlight some of the more interesting improvements. Faster variable lookup.   In both pqR

Read more »

New release of pqR, with a curated repository

June 21, 2014
By
New release of pqR, with a curated repository

I have released a new version, pqR-2014-06-19, of my speedier, “pretty quick”, implementation of R.  This and the previous release (pqR-2014-02-23) are maintenance releases, with bug fixes, improved documentation, and better test procedures. The result is that pqR now works with a large collection of 3438 packages. This collection was created starting with the complete set

Read more »

Inaccurate results from microbenchmark

February 2, 2014
By
Inaccurate results from microbenchmark

The microbenchmark package is a popular way of comparing the time it takes to evaluate different R expressions — perhaps more popular than the alternative of just using system.time to see how long it takes to execute a loop that evaluates an expression many times. Unfortunately, when used in the usual way, microbenchmark can give inaccurate

Read more »

New version of pqR, now with task merging

January 1, 2014
By
New version of pqR, now with task merging

 I’ve now released pqR-2013-12-29, a new version of my speedier implementation of R.  There’s a new website, pqR-project.org, as well, and a new logo, seen here. The big improvement in this version is that vector operations are sped up using task merging. With task merging, several arithmetic operations on a vector may be merged into a

Read more »

Deferred evaluation in Renjin, Riposte, and pqR

July 24, 2013
By
Deferred evaluation in Renjin, Riposte, and pqR

The previously sleepy world of R implementation is waking up.  Shortly after I announced pqR, my “pretty quick” implementation of R, the Renjin implementation was announced at UserR! 2013.  Work also proceeds on Riposte, with release planned for a year from now. These three implementations differ greatly in some respects, but interestingly they all try

Read more »

Fixing R’s NAMED problems in pqR

July 2, 2013
By
Fixing R’s NAMED problems in pqR

In R, objects of most types are supposed to be treated as “values”, that do not change when other objects change. For instance, after doing the following: a <- c(1,2,3) b <- a a <- 0 b is supposed to have the value 2, not 0. Similarly, a vector passed as an argument to a

Read more »

How pqR makes programs faster by not doing things

June 30, 2013
By
How pqR makes programs faster by not doing things

One way my faster version of R, called pqR (see updated release of 2013-06-28), can speed up R programs is by not even doing some operations. This happens in statements like for (i in 1:1000000) ..., in subscripting expressions like v, and in logical expressions like any(v>0) or all(is.na(X)). This is done using pqR’s internal “variant result” mechanism, which is

Read more »

Comparing the speed of pqR with R-2.15.0 and R-3.0.1

June 24, 2013
By
Comparing the speed of pqR with R-2.15.0 and R-3.0.1

As part of developing pqR, I wrote a suite of speed tests for R. Some of these tests were used to show how pqR speeds up simple real programs in my post announcing pqR, and to show the speed-up obtained with helper threads in pqR on systems with multiple processor cores. However, most tests in

Read more »