Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion list vs binary performarnce, destructuring and consing
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Loïc Hoguin  
View profile  
 More options Oct 23 2012, 5:00 am
From: Loïc Hoguin <es...@ninenines.eu>
Date: Tue, 23 Oct 2012 11:00:37 +0200
Local: Tues, Oct 23 2012 5:00 am
Subject: Re: [erlang-questions] list vs binary performarnce, destructuring and consing
On 10/23/2012 10:50 AM, Motiejus Jakštys wrote:

> On Tue, Oct 23, 2012 at 9:07 AM, Martynas Pumputis <martyn...@gmail.com> wrote:
>> Hi,

>> Could you show the exact steps of your simulation? Binary version should be
>> faster, because some extra memory allocation is avoided per each iteration
>> and large binaries aren't being copied.

>> Take a look at:
>> http://www.erlang.org/doc/efficiency_guide/binaryhandling.html

> I tried that last night and was surprised, so will share.

> Benchmark script:
> https://gist.github.com/3937666

> Session:
> 1> t:bench().
> Creating str of size 1048576.. done.
> Converting to binary.. done.
> Executing STR copy 30 times... done.
> Executing BIN copy 30 times... done.
> BIN: Mean:   139461.1, stdev:   7829.9
> STR: Mean:    79089.4, stdev:  53349.0

> No matter how hard I try, I cannot outperform lists.

> R15B02, 32-bit Linux.

Please try with the module t compiled with the native option.

Also the answer to "why binary" is generally either "because unicode" or
"because memory", not "lol speed". But it would be good if "lol speed"
could be improved eventually.

--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.