Soft labs. достижима ли в c++ эффективность языка среднего уровня

  • Published on
    01-Nov-2014

  • View
    379

  • Download
    1

Embed Size (px)

DESCRIPTION

 

Transcript

  • 1. DevLabs C++ ? Luxoft Training 2013 education@luxoft.com 1
  • 2. DevLabs C++ ? Luxoft Training 2013 2
  • 3. Luxoft Training 2013 3
  • 4. , , : 1998 C++ 2009 C++ 2012 Luxoft Training Luxoft Training 2013 . .. 4
  • 5. ? C++ . - : ? Luxoft Training 2013 5
  • 6. . C++ : C++ C / C++ 3 4- TIOBE Index c 2001 . Luxoft Training 2013 : C++11 / C++14 / C++17 , , .. 6
  • 7. C++ : C-: , . C++ : GCC: g++; Intel Composer XE Suites: Intel C++ Compiler . Luxoft Training 2013 . 7
  • 8. Luxoft Training 2013 - C++ 8
  • 9. - : ? : [ (DRAM)] ; . : (SRAM), ( !). Luxoft Training 2013 : -. -: . . 9
  • 10. - : ? : ; . Luxoft Training 2013 : ; . . ! 10
  • 11. : . . . : : Luxoft Training 2013 : 11
  • 12. : : : 28 x 28 (216 , 218 ); : 100; : . : x86: Intel Core i5 460M, 2533 , L1d: 2 x 32 ; x86-64: AMD E-450, 1650 , L1d: 2 x 32 / ; : Ubuntu Linux 12.04 LTS; : GCC 4.8.x. 2- L1d: (106 , 222 ); . Luxoft Training 2013 12
  • 13. Luxoft Training 2013 : 13
  • 14. : ( SSE-) 2 3 : Intel x86: 1,5 2,2 ; AMD x86-64: 1,8 3,8 . -0, -O1 (Intel x86 / AMD x86-64): 20 25%%. Luxoft Training 2013 SIMD- SSE, SSE2, SSE3 15 20%%. 14
  • 15. - ? . (. square blocking) . -: . Intel. Luxoft Training 2013 @ 3 : 1 0,33 10 15
  • 16. . - : Luxoft Training 2013 , ; ; ; , . Timer::Timer() : _start_time(0L), _end_time(0L), if(!_scheduled) { cpu_set_t mask; CPU_ZERO(&mask); CPU_SET(0, &mask); _total_time(0L), _min_time(0L) { // attach this (NULL) process to CPU #0 _scheduled = (sched_setaffinity((pid_t)NULL, sizeof(mask), &mask) == 0); } } 16
  • 17. Luxoft Training 2013 ? 17
  • 18. : ; () ; () . : ; , INC (++), DEC (--), (SIMD) .. Luxoft Training 2013 : ; . 18
  • 19. : ; , . : , -: L1d 64 . : : GCC- aligned Luxoft Training 2013 . // , uint64_t qwd __attribute((aligned(64))); // , typedef int __attribute((aligned(128))) al128int_t; al128int_t aln; 19
  • 20. : (struct) (class); ( ) . : ( , ) . : : 4 32 (13%) (., x86 Luxoft Training 2013 x86-64); ; typedef struct { // x86 int id; // 4 char name[15]; // 15 double amount; // 8 bool active; // 1 } account; // 28 ( 32 !) . 20
  • 21. : , : Luxoft Training 2013 ; , . () ; , . : ; -. 21
  • 22. : ; ; - L1i ; . : Luxoft Training 2013 ; , , , && , || . : __builtin_expect . 22
  • 23. : ; . : - (L1i, L2i, ); . Luxoft Training 2013 : , ; , . 23
  • 24. C++ C C++ (. GCC) Luxoft Training 2013 , ( ) 24
  • 25. - ( , . .. ). : 1. AMD E-Series E-450 specifications. URL: http://www.cpuworld.com/CPUs/Bobcat/AMD-E%20Series%20E-450.html Luxoft Training 2013 2. Intel Developer Zone: Intel Composer XE Suites. URL: http://software.intel.com/ru-ru/intel-composer-xe 3. Standard C++: Current Status. URL: http://isocpp.org/std/status 4. TIOBE Index for December 2013. URL: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html 25
  • 26. Luxoft Training 2013 1. Drepper, U. What Every Programmer Should Know About Memory (Nov. 2007). : http://ruslinux.net/lib.php?name=/MyLDP/hard/memory/memory.html 2. Fog, A. Optimizing Software in C++: An Optimization Guide for Windows, Linux and Mac platforms (Oct. 2013). URL: http://www.agner.org/optimize/optimizing_cpp.pdf 3. Goedecker, S., Hoisie, A. Performance Optimization of Numerically Intensive Codes (SIAM, 2001). 4. Intel 64 and IA-32 Architectures Optimization Reference Manual (July 2013). URL: http://www.intel.com/content/dam/www/public/us/en/documents/manu als/64-ia-32-architectures-optimization-manual.pdf 5. Wise, D.S., Frens, J.D. Auto-Blocking Matrix-Multiplication or Tracking BLAS3 Performance from Source Code. In Proc. 1997 ACM Symp. on Principles and Practice of Parallel Programming, SIGPLAN Not. 32, 7 (July 1997), 206-216. 26
  • 27. Luxoft Training 2013 27
  • 28. ! Luxoft Training 2013 ? 28
  • 29. Luxoft Training , , IntHR Luxtown , Luxtown , www.luxoft-training.ru/about www.luxoft-training.ru/timetable www.luxoft-training.ru/training/catalog_directions Luxoft Training 2013 www.luxoft-training.ru/contacts www.facebook.com/TrainingCenterLuxoft 29

Recommended

View more >