mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
Disable cache. It's broken.
This commit is contained in:
parent
49bd78b404
commit
8f3edbcdb3
1 changed files with 4 additions and 4 deletions
|
|
@ -36,10 +36,10 @@ namespace jit
|
||||||
ReturnCode ExecutionEngine::run(bytes const& _code, RuntimeData* _data, Env* _env)
|
ReturnCode ExecutionEngine::run(bytes const& _code, RuntimeData* _data, Env* _env)
|
||||||
{
|
{
|
||||||
std::string key{reinterpret_cast<char const*>(_code.data()), _code.size()};
|
std::string key{reinterpret_cast<char const*>(_code.data()), _code.size()};
|
||||||
if (auto cachedExec = Cache::findExec(key))
|
/*if (auto cachedExec = Cache::findExec(key))
|
||||||
{
|
{
|
||||||
return run(*cachedExec, _data, _env);
|
return run(*cachedExec, _data, _env);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
auto module = Compiler({}).compile(_code);
|
auto module = Compiler({}).compile(_code);
|
||||||
return run(std::move(module), _data, _env, _code);
|
return run(std::move(module), _data, _env, _code);
|
||||||
|
|
@ -95,8 +95,8 @@ ReturnCode ExecutionEngine::run(std::unique_ptr<llvm::Module> _module, RuntimeDa
|
||||||
return ReturnCode::LLVMLinkError;
|
return ReturnCode::LLVMLinkError;
|
||||||
|
|
||||||
std::string key{reinterpret_cast<char const*>(_code.data()), _code.size()};
|
std::string key{reinterpret_cast<char const*>(_code.data()), _code.size()};
|
||||||
auto& cachedExec = Cache::registerExec(key, std::move(exec));
|
//auto& cachedExec = Cache::registerExec(key, std::move(exec));
|
||||||
auto returnCode = run(cachedExec, _data, _env);
|
auto returnCode = run(exec, _data, _env);
|
||||||
|
|
||||||
auto executionEndTime = std::chrono::high_resolution_clock::now();
|
auto executionEndTime = std::chrono::high_resolution_clock::now();
|
||||||
clog(JIT) << " + " << std::chrono::duration_cast<std::chrono::milliseconds>(executionEndTime - executionStartTime).count() << " ms ";
|
clog(JIT) << " + " << std::chrono::duration_cast<std::chrono::milliseconds>(executionEndTime - executionStartTime).count() << " ms ";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue