From a7b383ab989e74ef552c2ef9c38377e065f1ab0e Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 21 Apr 2016 14:08:06 +0200 Subject: V4: calculate the hash only once when inserting a string. Reduces the number of instructions of IdentifierTable::identifier by ~15%. Change-Id: I5a234fa96a6ee3e7202150ded512d1be0b36560d Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4string_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/jsruntime/qv4string_p.h') diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h index 3196f49896..60e2655536 100644 --- a/src/qml/jsruntime/qv4string_p.h +++ b/src/qml/jsruntime/qv4string_p.h @@ -183,8 +183,8 @@ struct Q_QML_PRIVATE_EXPORT String : public Managed { void makeIdentifierImpl(ExecutionEngine *e) const; - static uint createHashValue(const QChar *ch, int length); - static uint createHashValue(const char *ch, int length); + static uint createHashValue(const QChar *ch, int length, uint *subtype); + static uint createHashValue(const char *ch, int length, uint *subtype); bool startsWithUpper() const { const String::Data *l = d(); -- cgit v1.2.3