Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 518973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:59:33+00:00 2026-05-13T07:59:33+00:00

In a test I’m building here my goal is to create a parser. So

  • 0

In a test I’m building here my goal is to create a parser. So I’ve built a concept proof that reads all messages from a file, and after pushing all of them to memory I’m spawning one process to parse each message. Until that, everything is fine, and I’ve got some nice results. But I could see that the erlang VM is not using all my processor power (I have a quad core), in fact it is using about 25% percent of my processor when doing my test. I’ve made a counter-test using c++ that uses four threads and obviously it is using 100% thus producing a better result (I’ve respected the same queue model erlang uses).

So I’m wondering what could be “slowing” my erlang test? I know it’s not a serialization matter as I’m spawning one process per message. One thing I’ve thought is that maybe my message is too small (about 10k each), and so making that much of processes is not helping achieve a great performance.

Some facts about the test:

106k messages
On erlang (25% processor power used) – 204 msecs
On my C++ test (100% processor power used) – 80 msecs

Yes the difference isn’t that great but if there is more power available certainly there is more room for improvement, right?

Ah, I’ve done some profilling and wasn’t able to find another way to optimize, since there are few function calls and most of them are string to object convertion.

Update:

Woooow! Following Hassan Syed idea, I’ve managed to achieve 35 msecs against 80 from c++! This is awesome!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:59:33+00:00Added an answer on May 13, 2026 at 7:59 am

    It seems your erlang VM is using only one core.

    Try starting it like this:

    erl -smp enable +S 4
    

    The -smp enable flag tells Erlang to start the runtime system with SMP support enabled
    With +S 4 you start 4 Erlang schedulers (1 for each core)

    You can see if you have SMP enabled when you start the shell:

    Erlang R13B01 (erts-5.7.2) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
    
    Eshell V5.7.2  (abort with ^G)
    1> 
    

    [smp:2:2] tells it is running with smp enabled 2 schedulers 2 schesulers online

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 262k
  • Answers 262k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Not automatically. I think you would have to write a… May 13, 2026 at 11:50 am
  • Editorial Team
    Editorial Team added an answer Neumont University has a Microsoft Software focus as an option.… May 13, 2026 at 11:50 am
  • Editorial Team
    Editorial Team added an answer 'unary operator expected' is the error when you use a… May 13, 2026 at 11:50 am

Related Questions

I have a French site that I want to parse, but am running into
I have the following method being called in a Java EE web application. public
I use Assert.Fail a lot when doing TDD. I'm usually working on one test
I'm trying to create an external MAML help file for a script Module. As
I've just started playing with Guice, and a use-case I can think of is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.