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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:54:50+00:00 2026-06-12T00:54:50+00:00

What is the differences between ParallelEnumerable.Range and Enumerable.Range(…).AsParallel() ? ParallelEnumerable.Range creates range partition( best

  • 0

What is the differences between ParallelEnumerable.Range and Enumerable.Range(...).AsParallel()?

ParallelEnumerable.Range creates range partition( best for operations where cpu time is equal foreach item)

where as Enumerable.Range(...).AsParallel() might be executes as range or chunk

Is there any performance difference ? When should I use which ?

  • 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-12T00:54:51+00:00Added an answer on June 12, 2026 at 12:54 am

    If you’re performing an operation where it’s CPU pressure grows as it iterates then you’re going to want to use AsParallel because it can make adjustments as it iterates. However, if it’s something that you just need to run in parallel and the operation doesn’t create more pressure as it iterates, then use ParallelEnumerable.Range because it can partition the work immediately.

    Reference this article for a more detailed explanation.

    So, let’s assume you’re performing some complex math in each iteration, and as the input values grow the math takes longer, you’re going to want to use AsParallel so that it can make adjustments. But if you use that same option with something like setting a registry setting, you’ll see a performance decrease because there is overhead associated with AsParallel that is not necessary.

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

Sidebar

Related Questions

Can I understand the differences between == and object.equal(Object obj) in the following way?
What are the differences between JAI's FileLoad/FileStore operations and its ImageRead/ImageWrite operations? Is one
The differences between StringBuilder and StringBuffer in Java are well documented and have been
There are any differences between using SetValue with (for example) Canvas.LeftProperty and Margin Property?
What are the differences between preg_replace() and preg_filter() ? In which situations should I
What are the main differences between these WPF controls? And when I should use
Are there any differences between LEA $1000,A0 and MOVE #$1000,A0 to put an address
I know the differences between IBAction and IBOutlet, but I don't know when I
What are differences between Visibility.Collapsed and Visibility.Hidden in WPF?
Is there any performance differences between string.Format and String.Format ? As far as i

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.