<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -127,12 +127,12 @@ module Foo #:nodoc:
           else
             logger.debug('Query held in cache.')
           end
-          return @query_cache[query].sort{|a,b| b &lt;=&gt; a }.collect{|a| a.first} if (options.has_key?(:ids_only) &amp;&amp; options[:ids_only]) || @query_cache[query].empty?
+          return @query_cache[query].sort.reverse.map(&amp;:first) if (options.has_key?(:ids_only) &amp;&amp; options[:ids_only]) || @query_cache[query].empty?
           
           # slice up the results by offset and limit
           offset = find_options[:offset] || 0
           limit = find_options.include?(:limit) ? find_options[:limit] : @query_cache[query].size
-          part_query = @query_cache[query].sort{|a,b| b &lt;=&gt; a }.slice(offset,limit).collect{|a| a.first}
+          part_query = @query_cache[query].sort.reverse.slice(offset,limit).map(&amp;:first)
           
           # Set these to nil as we are dealing with the pagination by setting
           # exactly what records we want.
@@ -153,7 +153,7 @@ module Foo #:nodoc:
                ranked_records[r] = @query_cache[query][r.id]
              end
           
-             ranked_records.to_a.sort{|a,b| b.last &lt;=&gt; a.last }.collect{|a| a.first}
+             ranked_records.to_a.sort_by{|a| a.last }.reverse.map(&amp;:first)
            end
           end
           </diff>
      <filename>lib/acts_as_indexed.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>966dafa66fe1a687326d7d5564af1ab87629030c</id>
    </parent>
  </parents>
  <author>
    <name>Douglas F Shearer</name>
    <email>dougal.s@gmail.com</email>
  </author>
  <url>http://github.com/dougal/acts_as_indexed/commit/c70f652cf1275089f9ed69260ef0f0a9887cac26</url>
  <id>c70f652cf1275089f9ed69260ef0f0a9887cac26</id>
  <committed-date>2009-07-02T15:05:28-07:00</committed-date>
  <authored-date>2009-07-02T15:05:28-07:00</authored-date>
  <message>Improved performance of sorts by 10x.
Minor other syntax changes.</message>
  <tree>ab2ca41f408f4c3a9b706a301c08deb765ba65da</tree>
  <committer>
    <name>Douglas F Shearer</name>
    <email>dougal.s@gmail.com</email>
  </committer>
</commit>
