Message Boards Message Boards

GROUPS:

Speeding up Interpolated function computation?

Posted 9 years ago
6414 Views
|
0 Replies
|
0 Total Likes
|

I am interested to know if there is a way I could speed up computation involving an interpolated function ( does the kernel generate an internally compiled code?) . Generally Compile works well for most types of problems not involving interpolation. In this case what is the suggested approach without using parallelization ? The relevant code is below:

fi = Interpolation[Table[{i, Sin[i]}, {i, 0, 1, 0.1}]];
a1 = Table[fi[0.35], {100000}] // Timing;
a2 = Table[Sin[0.35], {i, 1, 100000}] // Timing;
a1[[1]]
a2[[1]]
POSTED BY: Nabeel Butt
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract