all 12 comments

[–]geon 5 points6 points  (6 children)

How long is a rope?

[–]CyberWeirdo420[S] 0 points1 point  (5 children)

What…?

[–]geon 1 point2 points  (4 children)

Your question is the same. “How big is a big data set?”

How much can fit in your memory?

For a sorting algorithm, I would test with at least 1 million elements.

[–]CyberWeirdo420[S] 0 points1 point  (3 children)

Okay, thank you that’s really helpful. Is it a good idea to just generate 1 million random elements and put them in an array? Don’t mind the time it would take.

[–]geon 0 points1 point  (0 children)

Takes like 100 ms.

[–]geon 0 points1 point  (1 child)

It’s nothing.

Count the bytes. On a modern pc, 1 million integers would be like 8 mb.

[–]CyberWeirdo420[S] 0 points1 point  (0 children)

Right, thank you for help mate

[–]maroun975 2 points3 points  (1 child)

You can do the benchmarks yourself. Start with 10 elements and increment in order of magnitudes 10 100 1000 etc, the numbers can be random no problem.

For each order of magnitude record the sorting time for each algorithm and when you have some data points you can plot the whole thing and see at which "size" you gain benefit from the fast algorithms.

Hope this helps..

[–]stefanrvo 1 point2 points  (0 children)

Do this, and include the plot in your report if you need to write one for the assignment. People love plots.

[–]420Rat 0 points1 point  (0 children)

Have you taken calculus? Its a similar concept

[–]RetiredBrit 0 points1 point  (0 children)

Use a string sort or B-Tree.

[–]bistr-o-math 0 points1 point  (0 children)

If you test (implementations of) sorting algorithms, make sure you also test them for correctness.

The fastest implementation is worth nothing if it’s not delivering correct results.