Lessons in efficiency while coding Perl:

  • Use regular expressions to split tab-delimited fields in large data files.
  • Minimize number of elements in arrays and hashes.
  • Use indexing variables.
  • Use seek function rather than iteratively reading through filelines

Lessons in efficiency while coding R:

  • Avoid loops; use sapply (or variant thereof).
  • Label row names and column names of data frames for ease of subsetting.
  • Download packages that have useful functions instead of attempting to reinvent the wheel.

Post a Comment

*
*