Ticket #838 (closed task: fixed)

Opened 2 years ago

Last modified 2 years ago

Improving numpy import time

Reported by: cdavid Owned by: cdavid
Priority: normal Milestone: 1.2.0
Component: Other Version: none
Keywords: Cc: rkern

Description

Ok, here is a serie of patches to speed up numpy import times.

First one, postponing urllib2 import. All test pass with this one.

Attachments

urllib2.patch (1.8 KB) - added by cdavid 2 years ago.
Postpone urllib2 import: cut 1/6th of numpy import time on my machine
compiler_and_co.patch (1.5 KB) - added by cdavid 2 years ago.

Change History

Changed 2 years ago by cdavid

Postpone urllib2 import: cut 1/6th of numpy import time on my machine

Changed 2 years ago by cdavid

Another patch to postpone pydoc, inspect and compiler imports. BOth patchs applied cut 1/3 of import times (it looks like urrlib2 depends on inpsect, so the second one is not useful wo the first one)

Changed 2 years ago by cdavid

Changed 2 years ago by rkern

urllib2.patch and compiler_and_co.patch have been checked in as r5339. Any other opportunities?

Changed 2 years ago by cdavid

I don't think there are any other big hotspots. Importing numpy.core alone is 45 ms (vs 80 for the whole numpy). I think we are in the diminishing returns zone after that. ctypes is pretty slow to import (maybe 3-4 ms, another 10 %). After that, I should really use something better to measure, because I have my home on NFS here, which may add some latency (numpy in HOME).

Changed 2 years ago by cdavid

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.