Commit 1a926173 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Increase time we spend in the interpreter

(increase the reopt and osr thresholds by 2x)

This helps django a ton.  will probably hurt our microbenchmarks
but I don't care much about those right now.
parent c9743660
...@@ -955,7 +955,10 @@ static std::string getParserCommandLine(const char* fn) { ...@@ -955,7 +955,10 @@ static std::string getParserCommandLine(const char* fn) {
llvm::sys::path::append(parse_ast_fn, "src/codegen/parse_ast.py"); llvm::sys::path::append(parse_ast_fn, "src/codegen/parse_ast.py");
return std::string("python -S ") + parse_ast_fn.str().str() + " " + fn; // We may be running in an environment where "python" resolves to pyston (ex in
// a virtualenv), so try to hard code the path to CPython.
// This should probably be a configure-time check?
return std::string("/usr/bin/python -S ") + parse_ast_fn.str().str() + " " + fn;
} }
AST_Module* parse_string(const char* code) { AST_Module* parse_string(const char* code) {
......
...@@ -42,8 +42,8 @@ bool ENABLE_PYPA_PARSER = true; ...@@ -42,8 +42,8 @@ bool ENABLE_PYPA_PARSER = true;
bool USE_REGALLOC_BASIC = true; bool USE_REGALLOC_BASIC = true;
bool PAUSE_AT_ABORT = false; bool PAUSE_AT_ABORT = false;
int OSR_THRESHOLD_INTERPRETER = 200; int OSR_THRESHOLD_INTERPRETER = 500;
int REOPT_THRESHOLD_INTERPRETER = 100; int REOPT_THRESHOLD_INTERPRETER = 200;
int OSR_THRESHOLD_BASELINE = 10000; int OSR_THRESHOLD_BASELINE = 10000;
int REOPT_THRESHOLD_BASELINE = 250; int REOPT_THRESHOLD_BASELINE = 250;
int OSR_THRESHOLD_T2 = 10000; int OSR_THRESHOLD_T2 = 10000;
......
...@@ -665,7 +665,7 @@ extern "C" void listIteratorGCHandler(GCVisitor* v, Box* b) { ...@@ -665,7 +665,7 @@ extern "C" void listIteratorGCHandler(GCVisitor* v, Box* b) {
} }
Box* listNew(BoxedClass* cls, Box* container) { Box* listNew(BoxedClass* cls, Box* container) {
assert(cls->cls == type_cls); assert(isSubclass(cls->cls, type_cls));
assert(isSubclass(cls, list_cls)); assert(isSubclass(cls, list_cls));
return new (cls) BoxedList(); return new (cls) BoxedList();
} }
......
...@@ -6,6 +6,8 @@ try: ...@@ -6,6 +6,8 @@ try:
import __pyston__ import __pyston__
__pyston__.setOption("OSR_THRESHOLD_BASELINE", 50) __pyston__.setOption("OSR_THRESHOLD_BASELINE", 50)
__pyston__.setOption("REOPT_THRESHOLD_BASELINE", 50) __pyston__.setOption("REOPT_THRESHOLD_BASELINE", 50)
__pyston__.setOption("OSR_THRESHOLD_INTERPRETER", 50)
__pyston__.setOption("REOPT_THRESHOLD_INTERPRETER", 50)
__pyston__.setOption("SPECULATION_THRESHOLD", 10) __pyston__.setOption("SPECULATION_THRESHOLD", 10)
except ImportError: except ImportError:
pass pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment