Saturday

Measure execution time with Julia, example using sorting algorithms

# random integers between 1 and 100 inclusive, generate thousands of them

x = rand(1:100, 100000)


@time sort(x; alg=InsertionSort, rev=false)

# 1.091568 seconds (35.79 k allocations: 1.899 MiB, 2.55% compilation time)


@time sort(x; alg=QuickSort, rev=false)

# 0.099377 seconds (107.61 k allocations: 5.397 MiB, 98.81% compilation time)

No comments:

C++32 (or C++2e), C++ 2032, Cpp 2032, g++ 2032

  Subject: C++ 2032 3 Code example for ? 2 Approximate feature suggestions: - to complete C++29 or C++ 2029 1 Web links, references Wandbox,...