about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-03-02 13:57:40 -0800
committerbors <bors@rust-lang.org>2013-03-02 13:57:40 -0800
commitd19cbf8da3b59393bdb9c06d8b03e558c7575dbd (patch)
treecebcca304ec797f6c421e21621f287b1f732e14d
parentafdd0b868a4b94e828ccf7e1f68a2b0017943e2c (diff)
parent3550233d37c4acc5c438dbd2bab62869484b54a9 (diff)
downloadrust-d19cbf8da3b59393bdb9c06d8b03e558c7575dbd.tar.gz
rust-d19cbf8da3b59393bdb9c06d8b03e558c7575dbd.zip
auto merge of #5206 : thestinger/rust/cmp, r=brson
minor little performance issue - the vector and string implementations of TotalOrd turn out badly without explicitly inlining this
-rw-r--r--src/libcore/cmp.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index d588f0c53b1..d00824f8be6 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -45,6 +45,7 @@ pub trait TotalOrd {
     pure fn cmp(&self, other: &Self) -> Ordering;
 }
 
+#[inline(always)]
 pure fn icmp<T: Ord>(a: &T, b: &T) -> Ordering {
     if *a < *b { Less }
     else if *a > *b { Greater }