search for: mkemptycharlen

Displaying 1 result from an estimated 1 matches for "mkemptycharlen".

2011 Aug 04
1
slightly speeding up readChar()
...in the hash? Is it worth paying the time for those people who read in the same file twice? Finally about the allocation. Could the Charsxp be allocated to begin with, and the data read straight into it? Then we'd save one extra allocation, and a memcpy. For that one would need something like mkEmptyCharLen. One could also allocate a slighly bigger memory region, and then pass that so that instead of allocating it a new the old pointer is used (?). In any case, here is an updated readFixedString(), which would drop 2 O(N) operations. --- static SEXP readFixedString(Rconnection con, int len, int us...