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 4002098
In Process

The Archive Base Latest Questions

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

This question is specific to Erlang, but may have general implications to other IO

  • 0

This question is specific to Erlang, but may have general implications to other IO libraries. In Erlang, I can write io:format(IOF, "data: ~p", [Data]) and it will print the contents of the variable Data to the file IOF points to. My question is this: is it better, efficiency-wise, to prefer many small io:format() calls, or one huge one? For example, what would be faster? For purposes of demonstration, assume the size of my Data variables is 1KB each in size, and N > 100,000

Scenario A:

io:format(IOF, "data1: ~p", [Data1])
io:format(IOF, "data2: ~p", [Data2])
...
io:format(IOF, "dataN: ~p", [DataN])

Scenario B:

io:format(IOF, "data1: ~p data2: ~p ... dataN: ~p", [Data1, Data2, ..., DataN])

If this difference is negligible I’m not really interested, but if there could be a large difference then I’m interested in knowing why.

  • 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-20T07:59:05+00:00Added an answer on May 20, 2026 at 7:59 am

    I’d recommend you to research on file:open/2 modes, one of which is {delayed_write, Size, Delay}. It allows you to buffer data and effectively write it to the device.

    This way either calls wouldn’t probably make a huge difference.

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

Sidebar

Related Questions

This may have been already asked but I can't seem to find this specific
This question is specific to capistrano, but it's a general gem question too. I
I know this specific question has been asked before , but I am not
Note This is not a REBOL-specific question. You can answer it in any language.
All, I'm working on a SharePoint project, but this isn't a SharePoint-specific question per-se.
This question may be too product specifc but I'd like to know if anyone
This is a very narrow and specific question, but I know there are someone
This question was asked already here , but rather than answering the specific question,
This question is bit specific for Joomla. I have a main menu consisting of:
This is a specific version of this question . I want to check if

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.