aboutsummaryrefslogtreecommitdiff
path: root/challenge-110
diff options
context:
space:
mode:
authorJames Smith <js5@sanger.ac.uk>2021-04-27 12:20:26 +0100
committerGitHub <noreply@github.com>2021-04-27 12:20:26 +0100
commitcd96736b352012e6fc50dadc0e7759709fa31f1d (patch)
tree1d582ed548632a68bca0c306287afbff83f9e9f9 /challenge-110
parent41b7248730a5f8618a9bd87edd26aecb18d548de (diff)
downloadperlweeklychallenge-club-cd96736b352012e6fc50dadc0e7759709fa31f1d.tar.gz
perlweeklychallenge-club-cd96736b352012e6fc50dadc0e7759709fa31f1d.tar.bz2
perlweeklychallenge-club-cd96736b352012e6fc50dadc0e7759709fa31f1d.zip
Update README.md
Diffstat (limited to 'challenge-110')
-rw-r--r--challenge-110/james-smith/README.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/challenge-110/james-smith/README.md b/challenge-110/james-smith/README.md
index 014a7cd5d7..8e08f1b553 100644
--- a/challenge-110/james-smith/README.md
+++ b/challenge-110/james-smith/README.md
@@ -229,10 +229,13 @@ sub transpose_seek {
* We then use the regex trick to get the first column of the data.
* Memory usage:
+
* This script does not load the file all in one go - so really needs a lot less memory
(vs more disc accesses). It is linear in the number of lines, e.g. for the 1000 line file we load in
roughly 1Mb of data at a time, and the memory usage is roughly 1.3Mb.
* Note this is `O(n)` as well as if the rows get longer then the number of bytes used does not increase.
+ * Having played a bit - the sweet spot of `$BYTES` lies somewhere between 1K and 2K. Smaller makes the
+ regex in the split more efficient, larger reduces the file IO overhead.
### Some information about speed/memory etc...