mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
Improve TypedArray performance
* add element get/set internal method to TypedArray * internal methods of TypedArray directly access array buffer * disable inline cache only when property name is related to "Infinity" Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
9b9f980cfe
commit
912bc2d9ef
8 changed files with 371 additions and 254 deletions
|
|
@ -34,7 +34,6 @@
|
|||
#include "runtime/VMInstance.h"
|
||||
#include "runtime/IteratorObject.h"
|
||||
#include "runtime/GeneratorObject.h"
|
||||
#include "runtime/PromiseObject.h"
|
||||
#include "runtime/ScriptFunctionObject.h"
|
||||
#include "runtime/ScriptArrowFunctionObject.h"
|
||||
#include "runtime/ScriptClassConstructorFunctionObject.h"
|
||||
|
|
@ -45,7 +44,6 @@
|
|||
#include "parser/ScriptParser.h"
|
||||
#include "util/Util.h"
|
||||
#include "../third_party/checked_arithmetic/CheckedArithmetic.h"
|
||||
#include "runtime/ProxyObject.h"
|
||||
|
||||
namespace Escargot {
|
||||
|
||||
|
|
@ -1896,13 +1894,16 @@ NEVER_INLINE void ByteCodeInterpreter::setObjectPreComputedCaseOperationCacheMis
|
|||
return;
|
||||
}
|
||||
|
||||
const int maxCacheMissCount = 16;
|
||||
const int minCacheFillCount = 3;
|
||||
|
||||
// cache miss
|
||||
if (code->m_missCount > 16) {
|
||||
if (code->m_missCount > maxCacheMissCount) {
|
||||
originalObject->setThrowsExceptionWhenStrictMode(state, ObjectPropertyName(state, code->m_propertyName), value, willBeObject);
|
||||
return;
|
||||
}
|
||||
|
||||
if (code->m_missCount < 3) {
|
||||
if (code->m_missCount < minCacheFillCount) {
|
||||
code->m_missCount++;
|
||||
originalObject->setThrowsExceptionWhenStrictMode(state, ObjectPropertyName(state, code->m_propertyName), value, willBeObject);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue