[erlang-questions] I/O performance when reading from stdin

Hynek Schlawack hs@REDACTED
Sun Jan 11 11:50:10 CET 2009


Edward Stow schrieb:

> I am only an Erlang / FP noob but I would not be surprised that the
> Erlang code is slower as it is not really equivalent to the other
> implementations :  for example the python implemenation
> http://ptrace.fefe.de/wp/wp.py is streaming over stdin and only
> accumulating the word counts in a dictionary.
> 
> Whereas the erlang implementation reads the entire file into memory,
> with the overheads that are needed for storage and processing by ets.

Pardon my ignorance, but I though, I've been also streaming? Or is it
how reading from stdin in Erlang works: It's first completely read into
memory? That would explain bad performance as well as memory usage
compared to reading directly from a file.

Cheers,
Hynek



More information about the erlang-questions mailing list