From 4f40326fae7355ce899c892ac2b79b95d6de12a7 Mon Sep 17 00:00:00 2001 From: "verwaest@chromium.org" Date: Fri, 19 Oct 2012 15:03:27 +0000 Subject: [PATCH] Fast path for searching through simple transitions Review URL: https://chromiumcodereview.appspot.com/11189089 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/transitions-inl.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/transitions-inl.h b/src/transitions-inl.h index 2df300283..cfaa99d73 100644 --- a/src/transitions-inl.h +++ b/src/transitions-inl.h @@ -191,6 +191,11 @@ PropertyDetails TransitionArray::GetTargetDetails(int transition_number) { int TransitionArray::Search(String* name) { + if (IsSimpleTransition()) { + String* key = GetKey(kSimpleTransitionIndex); + if (key->Equals(name)) return kSimpleTransitionIndex; + return kNotFound; + } return internal::Search(this, name); } -- 2.34.1