Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
c9c93943
Commit
c9c93943
authored
Oct 20, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More utility code caching.
parent
108ab86b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+2
-0
Cython/Compiler/Optimize.py
Cython/Compiler/Optimize.py
+4
-1
No files found.
Cython/Compiler/Code.py
View file @
c9c93943
...
...
@@ -318,6 +318,8 @@ class ContentHashingUtilityCode(UtilityCode):
return
hash
((
self
.
proto
,
self
.
impl
))
def
__eq__
(
self
,
other
):
if
self
is
other
:
return
True
if
not
isinstance
(
other
,
type
(
self
)):
return
False
...
...
Cython/Compiler/Optimize.py
View file @
c9c93943
...
...
@@ -32,8 +32,11 @@ try:
except
ImportError
:
basestring
=
str
# Python 3
_utility_cache
=
{}
def
load_c_utility
(
name
):
return
ContentHashingUtilityCode
.
load
(
name
,
"Optimize.c"
)
if
name
not
in
_utility_cache
:
_utility_cache
[
name
]
=
ContentHashingUtilityCode
.
load
(
name
,
"Optimize.c"
)
return
_utility_cache
[
name
]
class
FakePythonEnv
(
object
):
"A fake environment for creating type test nodes etc."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment