Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PERF: fixed int64 indexing perf issue when conversion to int64 #3327

Merged
merged 1 commit into from
Apr 12, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions pandas/core/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,11 +1332,6 @@ def inferred_type(self):
def _constructor(self):
return Int64Index

@cache_readonly
def _engine(self):
# property, for now, slow to look up
return self._engine_type(lambda: com._ensure_int64(self.values), len(self))

@property
def asi8(self):
# do not cache or you'll create a memory leak
Expand Down
3 changes: 3 additions & 0 deletions pandas/index.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ cdef class IndexEngine:

cdef class Int64Engine(IndexEngine):

cdef _get_index_values(self):
return algos.ensure_int64(self.vgetter())

cdef _make_hash_table(self, n):
return _hash.Int64HashTable(n)

Expand Down