Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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++ºÍJava ÄĸöºÃ£¿ £¨Ô´×Ô Ææ»¢fvfve£©

JAVA¿ÉÒÔ˵ÊÇ´ÓC++·¢Õ¹ÆðÀ´µÄÍêÈ«ÃæÏò¶ÔÏóµÄ¿ª·¢ÓïÑÔ,Á½ÕßµÄʵÖÊÇø±ðÊÇÀûÒæ·ÖÊô²»Í¬µÄ¹«Ë¾:SUNºÍ΢Èí.¶Ô´Ë΢Èí·¢²¼ÁË.NETÓëÖ®¿¹ºâ.
´Ó×îеÄVisual Studio .NET 2005¿´,.NETÖ÷ÒªÊÇ4ÖÖÓïÑÔ:VB.NET, C#, C++.NET, J#.
VB.NET¿ÉÒÔ˵ÊÇVB6µÄÉý¼¶,µ«ÎÒÈÏΪVB.NETºÍC#ÒѾ­ÊÇÍêȫȫеÄÓïÑÔÁË,Á½ÕßµÄÄ¿µÄ¶¼ÊÇÒª´ò°ÜJAVAÕâ¸ö¾ºÕù¶ ......

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

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

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

ÔÚEclipseÖпª·¢C/C++ÏîÄ¿ תÌû


C/C++ development with the Eclipse Platform
Pawel Leszek
 
ÕªÒª:ͨ¹ý±¾ÎÄÄ㽫»ñµÃÈçºÎÔÚEclipseƽ̨ÉÏ¿ª·¢C/C++ÏîÄ¿µÄ×ÜÌåÈÏʶ¡£ËäÈ»EclipseÖ÷Òª±»ÓÃÀ´¿ª·¢JavaÏîÄ¿£¬µ«ËüµÄ¿ò¼ÜʹµÃËüºÜÈÝÒ×ʵÏÖ¶ÔÆäËû¿ª·¢ÓïÑÔµÄÖ§³Ö¡£ÔÚÕâÆªÎÄÕÂÀÄ㽫ѧ»áÈçºÎʹÓÃCDT(C/C++ Development Toolkit)£¬Ò»¸öÔÚEclipseƽ̨ÉÏ×î ......

C/C++²»¶¨²ÎÊýµÄÓ÷¨

C++²»¶¨²ÎÊýµÄÓ÷¨ £¨CÀàËÆ£©
2009-11-19 15:41
/*
va_list vl; //¶¨ÒåÒ»¸öÖ¸Ïò²ÎÊýÁбíµÄ±äÁ¿(Ò»¸ö...Ö¸Õë)
va_start(vl,first_param); //°ÑÖ¸Ïò²ÎÊýÁбíµÄ±äÁ¿³õʼ»¯
va_arg(vl,mode); //»ñÈ¡ÏÂÒ»¸ö²ÎÊý,²ÎÊýÀàÐÍÓɵڶþ¸ö²ÎÊýÖ¸¶¨,µÚ¶þ¸ö²ÎÊýÓÃÓÚÔÚva_argÄÚ²¿½øÐÐ³ß´ç¼ÆËã,ÒÔ±ãÕÒµ½ÏÂÒ»¸ö²ÎÊý
va_end(vl); //½áÊø
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ