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

  • SEARCH
  • Home
  • 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 6130205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:49:51+00:00 2026-05-23T16:49:51+00:00

If I had code which were to read every word of a file into

  • 0

If I had code which were to read every word of a file into an ArrayList or HashSet, would it be any faster to split the code into multiple worker threads and assign each a chunk of the file to work on (assuming multiple cores)? My gut says no since the I/O would usually be the bottleneck rather than the CPU in a case like this.

  • 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-23T16:49:52+00:00Added an answer on May 23, 2026 at 4:49 pm

    It depends. Your line of thinking that the IO is going to be the bottleneck could be correct since a lot of disks work in a serial fashion. But, what if that disk were special like an SSD or a RAID that really did support concurrent access? Also, if there were a significant amount of CPU bound post processing that needs to be done with the data then you could get that going concurrently while another batch of data is being read. Do not write off the concurrent options so quickly!

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

Sidebar

Related Questions

I was looking at an authentication system which had this code: # prevents a
I had a code segment on an asp.net page in the code-behind file. I
I had tested this code: http://support.microsoft.com/kb/316383 It works, but a Word application is opened
My intention is to read every directory and file rooted at a directory given
I'm looking into speeding up my python code, which is all matrix math, using
I had this task to read a file, store each character in a dict
I had code that worked fine when running in the context of the main
Suppose you had code like this: _READERS = None _WRITERS = None def Init(num_readers,
I had some code that ran commands through Runtime.getRuntime.exec(String) , and it worked on
I had this code: int foo(void){ return 1; } int main(void){ static const int

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.