Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

תÔØ:Hadoop Ó¦¸ÃÓÃC++ʵÏÖ£¬¶ø²»ÊÇJava

http://www.trendcaller.com/2009/05/hadoop-should-target-cllvm-not-java.html
Sunday, May 10, 2009
Hadoop should target C++/LLVM, not Java (because of watts)
< type="text/javascript">
digg_url="http://www.trendcaller.com/2009/05/hadoop-should-target-cllvm-not-java.html";
Over the years, there have been many contentious arguments about the
performance of C++ versus Java. Oddly, every one I found addressed only
one kind of performance (work/time). I can't find any benchmarking of
something at least as important in today's massive-scale-computing
environments, work/watt. A dirty little secret about JIT technologies
like Java, is that they throw a lot more CPU resources at the problem,
trying to get up to par with native C++ code. JITs use more memory, and
periodically run background optimizer tasks. These overheads are
somewhat offset in work/time performance, by extra optimizations which
can be performed with more dynamic information. But it results in a
hungrier appetite for watts. Another dirty little secret about Java vs
C++ benchmarks is that they compare single-workloads. Try running 100
VMs, each with a Java and C++ benchmark in it and Java's hungrier
appetite for resources (MHz, cache, RAM) will show. But of course, Java
folks don't mention that.
But
let's say for the sake of (non-)argument, that Java can achieve a 1:1
work/time performance relative to C++, for a single program. If Java
consumes 15% more power doing it, does it matter on a PC? Most people
don't dare. Does it matter for small-scale server environments? Maybe
not. Does it matter when you deploy Hadoop
on a 10,000 node cluster, and the holistic inefficiency (multiple
things running concurrently) goes to 30%? Ask the people who sign the
checks for the power bill. Unfortunately, inefficiency scales really
well.
Btw, Google's MapReduce framework is C++ based. So isn't Hypertable
, the clone of Google's Bigtable distributed data storage system. The rationale fo


Ïà¹ØÎĵµ£º

C/C++»ù±¾Êý¾ÝÀàÐÍ

ÁËCÈ»ºóC++£¬È»ºóMFC/Windows,È»ºóÊÇC#,ÆäÖÐÊý¾ÝÀàÐͺܶ࣬ÓÉ»ù±¾ÀàÐÍÑÜÉúµÄtypedefÀàÐÍÒ²N¶à¡£ÊìÖª»ù±¾Êý¾ÝÀàÐÍÊÇÎÒÃÇÕýÈ·±í´ïʵ¼ÊÎÊÌâÖи÷ÖÖÊý¾ÝµÄÇ°ÌᣬÒò´ËÎÒ·ÖÀà×ܽáÁËÒ»ÏÂC/C++/Windows /C#»ù±¾Êý¾ÝÀàÐÍ£¬ÒÔ±ãÈÕºó²éÔÄ¡£
         ANSI C/C++»ù±¾Êý¾ÝÀàÐÍ£º
Type
Size
Ê ......

CÓëC++Îļþ»¥Ïàµ÷ÓÃ

ʱ³£ÔÚcppµÄ´úÂëÖ®Öп´µ½ÕâÑùµÄ´úÂë:
#ifdef __cplusplus 
extern "C" { 
#endif
//Ò»¶Î´úÂë
#ifdef __cplusplus 

#endif 
    ÕâÑùµÄ´úÂëµ½µ×ÊÇʲôÒâ˼ÄØ£¿Ê×ÏÈ£¬__cplusplusÊÇcppÖеÄ×Ô¶¨Òåºê£¬ÄÇô¶¨ÒåÁËÕâ¸öºêµÄ»°±íʾÕâÊÇÒ»¶ÎcppµÄ´úÂ룬Ҳ¾ÍÊÇ˵£¬ÉÏÃæµÄ´úÂëµÄº ......

linux»·¾³Ï£¬c++¿âÎļþÖеķûºÅµÄº¬Òå

c++¿âÎļþÖеķûºÅµÄº¬Ò壺
      ËùÓеķûºÅ¶¼ÊÇÒÔÏ»®Ïß¼ÓÉÏ´óд×ÖĸҲ¾ÍÊÇ"_Z"¿ªÍ·£¬¶ÔÓÚÔÚ ÀàÀï»òÕßÃüÃû¿Õ¼äÖеķûºÅ£¬ºóÃæ½ô¸ú"N"£¬È»ºóÊǸ÷¸öÃüÃû¿Õ¼äºÍÀàµÄÃû×Ö£¬Ã¿¸öÃû×ÖÇ°ÊÇÃû×Ö×Ö·û´®µÄ³¤¶È£¬ËæºóÊÇ´óд×Öĸ"E"£¬¶ÔÓÚÒ»¸öº¯Êý£¬ËûµÄ²ÎÊýÁÐ±í¶¼ÔÚEºóÃ棬 ......

C++ XML½âÎöÖ®TinyXMLƪ

¡¡±êÇ©£ºXML½âÎö TinyXML¡¡¡¡¡¡[ÍÆË͵½¼¼ÊõȦ]
°æȨÉùÃ÷£ºÔ­´´×÷Æ·£¬ÔÊÐíתÔØ£¬×ªÔØʱÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕ ԭʼ³ö´¦ ¡¢×÷ÕßÐÅÏ¢ºÍ±¾ÉùÃ÷¡£·ñÔò½«×·¾¿·¨ÂÉÔðÈΡ£http://panpan.blog.51cto.com/489034/104961
×î½üʹÓÃTinyXML½øÐÐC++ XML½âÎö£¬¸Ð¾õʹÓÃÆðÀ´±È½Ï¼òµ¥£¬ºÜÈÝÒ×ÉÏÊÖ£¬±¾Îĸø³öÒ»¸öʹÓÃTinyXML½øÐÐXML½â ......

C/C++ÓïÑÔʵÏÖ¶¯Ì¬Êý×é

C/C++ÓïÑÔʵÏÖ¶¯Ì¬Êý×é
CÊý×éµÄСÎÊÌâ
     ÕâÀï˵µÄ¶¯Ì¬Êý×éÊÇ¿ÉÒÔ¸ù¾ÝÐèÒª¶¯Ì¬Ôö³¤Õ¼ÓÃÄÚ´æµÄÊý×飬±ÈÈç³ÌÐò³õʼ·ÖÅäÁË100¸öÔªËØ£¬¿ÉÊÇÔËÐÐÁËÒ»¶Îʱ¼äºóÇøÇø100¸ö¿Õ¼ä²»ÄÜÂú×ãÁË£¬ÏÖÔÚÐèÒª400¸ö£¬Ôõô°ìÄØ£»Äǿ϶¨ÐèÒªÔÙ¶îÍâ·ÖÅä300¸ö¡£
     CÓïÑÔÓÐrealloc()º¯ÊýÀ´½â¾ö¿Õ¼ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ