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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:18:00+00:00 2026-06-10T17:18:00+00:00

In which scenarios Will Range partitioning will be better choice than Chunk partitioning ?

  • 0

In which scenarios Will Range partitioning will be better choice than Chunk partitioning ? (and vise verse)

I already know that

  • Chunk partitioning : grabbing smal chunks of elements from the input to process , he starts with small chunks then , increases the chunk size.

  • Range partitioning preallocates an equal number of elements to each worker

Also , Why this code : ( finding prime numbers till 100000)

IEnumerable<int> numbers = Enumerable.Range (3, 100000-3);
var parallelQuery =    from n in numbers.AsParallel()
                       where Enumerable.Range (2, (int) Math.Sqrt (n)).All (i => n % i > 0)
                       select n;

Might perform poorly with range partitioning ?

While this code : (finding the sum of sqrt of the first million numbers)

ParallelEnumerable.Range (1, 10000000).Sum (i => Math.Sqrt (i))

Will be better a better choice to use with range partitioning ?

  • 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-06-10T17:18:02+00:00Added an answer on June 10, 2026 at 5:18 pm

    In the first sample , the required tme per item depends on n. Searching for the next prime number after 90000 takes more time than finding the one after 11.

    As a result, when divided into equal ranges, the last ranges will have to perform much more work than the first.

    In the second sample the time-per-operation is equal over the entire range. So range partitioning will work well.

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

Sidebar

Related Questions

I know that both these databases are better for different scenarios but in terms
It seems to me that there are two scenarios in which to use JOINs:
I will compare 2 scenarios to add Rsvp rows. Which one do you prefer
I'm creating a UserControl which will be used in various scenarios. I need to
Can you please help me with deciding which one of the following scenarios will
What are the scenarios in which I should call finish() method on back button
We upgrated Nhibernate to 3.2 and getting problem in following scenarios: Public properties which
C# 4 introduced a feature called named arguments which is especially useful in scenarios
Hi experts I want to know in which scenario I have more Performance(Time to
Last night I was thining that programming languages can have a feature in which

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.