Skip to main content
Code Review

Return to Answer

fixed spelling, removed plinq tag - no questions tagged with it!
Source Link

Some advicesadvice:

  1. Replace File.ReadAllLines with File.ReadLinesfirstReadAllLines will read all file content into memory before startthe iteration, and foreach is really designed tofor IEnumerable.
  2. DefinetlyDefinitely replace for (int row = 0; row < numbers.Count; row++), for (int j=0; j<rowTotal.Length; j++) and for (int i = 1; i <= iterations; i++) with PLinq as @ANeves adviced you beforesuggested
  3. Not sure that replacing foreach (string line in File.ReadAllLines(@"data.txt")) will help you, as it is heavily dependdependent on disc I/O operations.

Some advices:

  1. Replace File.ReadAllLines with File.ReadLinesfirst will read all file content into memory before start, and foreach is really designed to IEnumerable
  2. Definetly replace for (int row = 0; row < numbers.Count; row++), for (int j=0; j<rowTotal.Length; j++) and for (int i = 1; i <= iterations; i++) with as @ANeves adviced you before
  3. Not sure that replacing foreach (string line in File.ReadAllLines(@"data.txt")) will help you, as it is heavily depend on disc I/O operations.

Some advice:

  1. Replace File.ReadAllLines with File.ReadLinesReadAllLines will read all file content into memory before the iteration, and foreach is really designed for IEnumerable.
  2. Definitely replace for (int row = 0; row < numbers.Count; row++), for (int j=0; j<rowTotal.Length; j++) and for (int i = 1; i <= iterations; i++) with PLinq as @ANeves suggested
  3. Not sure that replacing foreach (string line in File.ReadAllLines(@"data.txt")) will help you, as it is heavily dependent on disc I/O operations.
Source Link
Akim
  • 475
  • 3
  • 13

Some advices:

  1. Replace File.ReadAllLines with File.ReadLinesfirst will read all file content into memory before start, and foreach is really designed to IEnumerable
  2. Definetly replace for (int row = 0; row < numbers.Count; row++), for (int j=0; j<rowTotal.Length; j++) and for (int i = 1; i <= iterations; i++) with as @ANeves adviced you before
  3. Not sure that replacing foreach (string line in File.ReadAllLines(@"data.txt")) will help you, as it is heavily depend on disc I/O operations.
lang-cs

AltStyle によって変換されたページ (->オリジナル) /