Index: wp-includes/comment-template.php
===================================================================
--- wp-includes/comment-template.php	(revision 9508)
+++ wp-includes/comment-template.php	(working copy)
@@ -435,15 +435,16 @@
  * @uses $comment
  *
  * @param object|string|int $comment Comment to retrieve.
+ * @param string|int $page The comment's page if known. Optional. Avoids extra database query.
  * @return string The permalink to the current comment
  */
-function get_comment_link($comment = null) {
+function get_comment_link( $comment = null, $page = null ) {
 	global $wp_rewrite;
 
 	$comment = get_comment($comment);
 
 	if ( get_option('page_comments') ) {
-		$page = get_page_of_comment( $comment->comment_ID );
+		$page = ( null !== $page ) ? (int) $page : get_page_of_comment( $comment->comment_ID );
 
 		if ( $wp_rewrite->using_permalinks() )
 			return user_trailingslashit( trailingslashit( get_permalink( $comment->comment_post_ID ) ) . "comment-page-$page", 'comment' ) . '#comment-' . $comment->comment_ID;
@@ -1150,7 +1151,7 @@
 		<br />
 <?php endif; ?>
 
-		<div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date('F jS, Y'),  get_comment_time()) ?></a><?php edit_comment_link('edit','&nbsp;&nbsp;','') ?></div>
+		<div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID, $page ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date('F jS, Y'),  get_comment_time()) ?></a><?php edit_comment_link('edit','&nbsp;&nbsp;','') ?></div>
 
 		<?php comment_text() ?>
 
Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 9508)
+++ wp-includes/comment.php	(working copy)
@@ -536,6 +536,8 @@
  * @return int|null Comment page number or null on error.
  */
 function get_page_of_comment( $comment_ID, $per_page = null, $threaded = null ) {
+	global $wpdb;
+
 	if ( !$comment = get_comment( $comment_ID ) )
 		return;
 
@@ -552,25 +554,15 @@
 	if ( $threaded && 0 != $comment->comment_parent )
 		return get_page_of_comment( $comment->comment_parent, $per_page, $threaded );
 
-	$comments = get_comments( array( 'post_id' => $comment->comment_post_ID, 'order' => 'ASC' ) );
+	// Count comments older than this one
+	$oldercoms = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = 0 AND comment_date_gmt < '%s'", $comment->comment_post_ID, $comment->comment_date_gmt ) );
 
-	// Start going through the comments until we find what page number the above top level comment is on
-	$page = 1;
-	$comthispage = 0;
-	foreach ( $comments as $com ) {
-		if ( $threaded && 0 != $com->comment_parent )
-			continue;
+	// No older comments? Then it's page #1.
+	if ( 0 == $oldercoms )
+		return 1;
 
-		if ( $com->comment_ID == $comment->comment_ID )
-			return $page;
-
-		$comthispage++;
-
-		if ( $comthispage >= $per_page ) {
-			$page++;
-			$comthispage = 0;
-		}
-	}
+	// Divide comments older than this one by comments per page to get this comment's page number
+	return ceil( ( $oldercoms + 1 ) / $per_page );
 }
 
 /**
Index: wp-includes/widgets.php
===================================================================
--- wp-includes/widgets.php	(revision 9508)
+++ wp-includes/widgets.php	(working copy)
@@ -1387,7 +1387,7 @@
 		$number = 15;
 
 	if ( !$comments = wp_cache_get( 'recent_comments', 'widget' ) ) {
-		$comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT $number");
+		$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT $number");
 		wp_cache_add( 'recent_comments', $comments, 'widget' );
 	}
 ?>
@@ -1396,7 +1396,7 @@
 			<?php echo $before_title . $title . $after_title; ?>
 			<ul id="recentcomments"><?php
 			if ( $comments ) : foreach ( (array) $comments as $comment) :
-			echo  '<li class="recentcomments">' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
+			echo  '<li class="recentcomments">' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_comment_link($comment->comment_ID) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
 			endforeach; endif;?></ul>
 		<?php echo $after_widget; ?>
 <?php
