[erlang-questions] Not an Erlang fan
Thomas Lindgren
thomasl_erlang@REDACTED
Mon Sep 24 09:08:24 CEST 2007
--- dda <headspin@REDACTED> wrote:
> But what he is parsing here is plain text, not XML
Indeed, but the XML example shows that parsing as such
is not inherently slower in Erlang than in Ruby. The
point is that simple examples and benchmarks may not
generalize to broader statements.
> -- and his
> complaints are about i/o and regexes, which are
> indeed slow.
I wouldn't say I/O is inherently slow; for example,
reading large chunks of files into memory with
file:read_file and similar functions is fast enough.
Regexps are currently not a strength and could be sped
up. (Robert, here's your time to shine :-)
Also, when I consider the use of io:get_line/2, it
seems it may be "too easy" to choose a suboptimal
solution to some problems. That can be a problem in
situations like this, when the user base grows quickly
outside the core community and the new users thus
can't rely on helpful insiders.
Best,
Thomas
> However I
> think that he's mocking some of Erlang best features
> without really
> using them, and I think we should prove him -- he
> asks for it after
> all! -- that Erlang can do the job, and that if he
> can't wrap his old
> Perl brain around it, not our fault...
>
> --
> Didier
>
> On 9/24/07, Thomas Lindgren
> <thomasl_erlang@REDACTED> wrote:
> > He's also using the obvious, tempting but very
> slow
> > io:read_line. Reading the entire file into a
> binary
> > takes 7 ms (sic) using file:read_file, not 34
> seconds
> > using io:read_line as he reports. For a beginner
> it's
> > not obvious what to use, though, so life could be
> > easier.
> >
> > My own experience with parsing XML in Erlang vs
> Ruby
> > is that xmerl parsing about 4 MB of XML handily
> beat
> > "the obvious" Ruby library the other guy used
> > (REXML?), being 10+ times faster or more -- xmerl
> > needed 10 seconds versus "a few minutes" for Ruby.
> So
> > I wouldn't say Erlang is inherently slow w.r.t.
> > parsing, but again, one may need some experience
> to
> > get it right.
> >
> > Best,
> > Thomas
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
>
http://www.erlang.org/mailman/listinfo/erlang-questions
>
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/
More information about the erlang-questions
mailing list