search for: readfixedstr

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

2011 Aug 04
1
slightly speeding up readChar()
...simple changes that will make readChar slightly faster. I followed readChar(useBytes=T), and tried to identify all O(N) operations, where N is the size of the file. The assumption is that for LARGE files we want to avoid any O(N) operations, and any O(N) memory allocations. Here they are: 1. In readFixedString in envir.c, an N sized vector is allocated, and memset to 0. O(N) 2. The file is read into the buffer with con->read O(N) (but this probably can't be dropped) 3. mkChar is called, which calls mkCharLenCE(name, strlen(name), CE_NATIVE); strlen is O(N) 4. In mkCharLenCE, a loop along...