Using self time to predict a speedup

A finite-element model takes 120.0 s to run. The IDE's profiler reports:


Function

Calls

Self time (s)

Cumulative time (s)

run_model

1

3.0

120.0

solve_linear

400

78.0

78.0

assemble_matrix

400

21.0

30.0

element_stiffness

96000

9.0

9.0

write_results

1

9.0

9.0


assemble_matrix calls element_stiffness. You vectorise the code inside assemble_matrix itself, so that its self time falls by a factor of 3. element_stiffness is untouched and is called the same number of times. Assume every other function's time is unchanged and profiler overhead is negligible.


What is the new total run time? Give your answer in seconds, to one decimal place.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Integrated Development Environment (IDE) Questions: