Showing posts from August, 2014

Try optimising the memory consumption first

Overview You would think that if you wanted your application to go faster you would start with the CPU profiling.  However, when looking for quick wins, it's the memory profiler I target first. Allocating memory is cheap Allocating memory has never been cheaper.  Memory is cheaper, you can get machines will thousands of GBs of memory. You can buy 16 GB for less than $200. The memory allocation operation is cheaper than in the past, and it's multi-threaded so it scales reasonably well. However, memory allocation is not free.  Your CPU cache is a precious resources especially if you are trying to use multiple threads.  While you can buy 16 GB of main memory easily, you might only have 2 MB of cache per logical CPU.  If you want these CPUs to run independently, you want to spend as much time as possible within the 256 KB L2 cache. Cache level Size access time in clock cycles concurrency 1 32 KB data 32 KB instruction 1 cores independent 2 256 KB 3 c

Team training in Expert Core Java

Overview We have new course material for the second half of this year.  Core Java Training We provide tailored team training for advanced and expert Java Developers at a low cost per head.  Select from the topics below.  We can provide training on site for your organization, world wide. For more details, see the  Core Java Training  web page. Expert Java Development (2-3 days) Working with primitives to save memory and reduce garbage. How to use  double  and  long  safely instead of BigDecimal. How to use collections like Map, Set, ConcurrentMap, NavigableMap, List, Queue, BlockingQueue and Deque effectively. How to use thread pools and fork join. Asynchronous processing and exception handling. How to use Lambdas in Java 8 for lazy evaluation and parallel coding. How to use Plain IO and NIO, files, TCP and UDP. volatile , read/write memory barriers and when you need them. default  methods in Java 8. Using  enum  for singletons and utility classes. Java 8 JSR-310