The Artima Developer Community
Sponsored Link

Java Buzz Forum
Funny comment in the Android sources

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Markus Kohler

Posts: 74
Nickname: kohlerm
Registered: Jun, 2008

Markus Kohler is an software architect at SAP
Funny comment in the Android sources Posted: Oct 21, 2008 1:17 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Markus Kohler.
Original Post: Funny comment in the Android sources
Feed Title: Java Performance blog
Feed URL: http://feeds.feedburner.com/JavaPerformanceBlog
Feed Description: My blogs about Java Performance related topics
Latest Java Buzz Posts
Latest Java Buzz Posts by Markus Kohler
Latest Posts From Java Performance blog

Advertisement
Android is now open source.

Just by accident I ran into the following funny comment:

98 /*

99 * Count the number of '1' bits in a word.
101 * Having completed this, I'm ready for an interview at Google.

103 * TODO? there's a parallel version w/o loops. Performance not currently
104 * important.
105 */
106 static int countOnes(u4 val)

108 int count = 0;
110 while (val != 0) {

111 val &= val-1;
112 count++;

115 return count;


:)

Read: Funny comment in the Android sources

Topic: Another Configuration Management Snafu - Asus eee Previous Topic   Next Topic Topic: Debriefing - Silverlight 2.0, “Open Web,” Firefox, IT Spending, &co. from PeopleOverProcess.com

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use