[erlang-questions] slow file I/O (was Not an Erlang fan)
Thu Sep 27 21:38:00 CEST 2007
Wow, Per Gustafsson' code travels the whole dataset and get all lines
ready only took 1.57 seconds on my computer, that's really fast. Will
the line_server be part of OTP?
On 9/28/07, Caoyuan <> wrote:
> It took the code 5.1 seconds on my machine.
> From line_server:divide_lines/3, it seems binary matching should avoid
> one byte matching as Thomas said :-)
> BTW, after add -compile([native]). My code took about 5.2 seconds now,
> where process_match tooks about 1.2 seconds of this 5.2 seconds.
> - Caoyuan
> On 9/27/07, Per Gustafsson <> wrote:
> > I've made another solution for this problem based on a line_server which
> > serves lists of lines taken from a file. It runs in about 8 secs on a
> > 2 p4 2.4 ghz machine using R11B-5 and in about 5 secs using an R-12
> > pre-release, but the program should scale to more processors.
> > To compile the modules write:
> > erl -smp -make
> > To run the program write on your command line:
> > erl -smp -noshell -run pcount run filename n
> > where n is the number of processes you want to split the work on. Note
> > that the modules are native compiled if possible.
> > Per
More information about the erlang-questions