[erlang-questions] slow file I/O (was Not an Erlang fan)

Caoyuan dcaoyuan@REDACTED
Thu Sep 27 21:14:38 CEST 2007

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 <per.gustafsson@REDACTED> 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 mailing list