projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a116cd8
)
Micro-optimization for IList.Contains array implementation (#7347)
author
James Ko
<jamesqko@gmail.com>
Sun, 25 Sep 2016 03:11:10 +0000
(23:11 -0400)
committer
Jan Kotas
<jkotas@microsoft.com>
Sun, 25 Sep 2016 03:11:10 +0000
(20:11 -0700)
src/mscorlib/src/System/Array.cs
patch
|
blob
|
history
diff --git
a/src/mscorlib/src/System/Array.cs
b/src/mscorlib/src/System/Array.cs
index
b5cbcf0
..
2260fd7
100644
(file)
--- a/
src/mscorlib/src/System/Array.cs
+++ b/
src/mscorlib/src/System/Array.cs
@@
-2799,7
+2799,7
@@
namespace System {
//! Warning: "this" is an array, not an SZArrayHelper. See comments above
//! or you may introduce a security hole!
T[] _this = JitHelpers.UnsafeCast<T[]>(this);
//! Warning: "this" is an array, not an SZArrayHelper. See comments above
//! or you may introduce a security hole!
T[] _this = JitHelpers.UnsafeCast<T[]>(this);
- return Array.IndexOf(_this, value
) != -1
;
+ return Array.IndexOf(_this, value
, 0, _this.Length) >= 0
;
}
bool get_IsReadOnly<T>() {
}
bool get_IsReadOnly<T>() {
@@
-2818,7
+2818,7
@@
namespace System {
//! Warning: "this" is an array, not an SZArrayHelper. See comments above
//! or you may introduce a security hole!
T[] _this = JitHelpers.UnsafeCast<T[]>(this);
//! Warning: "this" is an array, not an SZArrayHelper. See comments above
//! or you may introduce a security hole!
T[] _this = JitHelpers.UnsafeCast<T[]>(this);
- return Array.IndexOf(_this, value);
+ return Array.IndexOf(_this, value
, 0, _this.Length
);
}
void Insert<T>(int index, T value) {
}
void Insert<T>(int index, T value) {