[erlang-questions] Erlang/YAWS vs Free Pascal/Xitami

Ulf Wiger ulf@REDACTED
Tue Mar 25 12:40:56 CET 2008


It was interesting to see that it actually gave better
performance as well as being more concise, even
though I guess the difference lies within the margin
of error. My expectation was that it would make no
significant difference, performance-wise.

BR,
Ulf W

2008/3/25, Jilani Khaldi <jilani@REDACTED>:
> > ....which gives us:
>
> >
>  > var_dev(V) ->
>  >   Len = length(V),
>  >   Media = lists:sum(V) / Len,
>  >   D = [X-Media || X <- V],
>  >   Q = [X*X || X <-D],
>  >   S = lists:sum(Q),
>  >   Var = S / Len,
>  >   Dev = math:sqrt(Var),
>  >   {Media, D, Q, S, Var, Dev}.
>  >
>  > out(A) ->
>  > Z=lists:seq(1,1000),
>  > {Media, D, Q, S, Var, Dev} = var_dev(Z),
>  > T=io_lib:format("Std Dev: ~.6f ", [Dev]),
>  > {html, T}.
>
> Thank you Ulf! I just have updated the article adding your code and the
>  results for 10000 connections.
>
> --
>
> ***
>  Jilani KHALDI
>  http://www.dotpas.org
>



More information about the erlang-questions mailing list