Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

New Wind of Java

4,366 views

Published on

"New Wind of Java"
富山合同勉強会 .NET & Java ~ぶりしゃぶで休もう~ 資料

Published in: Technology
  • /.DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... /.DOWNLOAD PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... /.DOWNLOAD EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... /.DOWNLOAD doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... /.DOWNLOAD PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... /.DOWNLOAD EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... /.DOWNLOAD doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

New Wind of Java

  1. 1. New Wind of 9.‘ A I--‘K’-L‘ '. ‘ j {.5 L_, . _ ' " . ’_ . "" "_'; ‘tr ' ’ l ‘1 er . 9 v ’ . , , «,2 g , ;r_ V_ . _ ‘. ‘:. x. , __. ..~. . _: “_" “_~.
  2. 2. Background Project Valhallais Project Pana I » a) ti‘; .' ‘ L ’ 1, . ' ' ' .1
  3. 3. I Background E
  4. 4. P t ,1 emo Light Speed
  5. 5. Memory is the New Disk
  6. 6. 1 Core 10 3 Register 1CLK 102KB L1 ~ 3CLK 103KB ~ 15cLK 104” SKB TM BUS ~ ZOOCLK
  7. 7. Avoid a Cache Miss Locate Related Data Near
  8. 8. Project Valhalla Value Type
  9. 9. class Point { final int X; final int y; }
  10. 10. Header Point[] pts = Header ' x Y * [ Header * x Y . ——{ Header x Y
  11. 11. int[] x = Header
  12. 12. Point[] pts = Header Value Type
  13. 13. value class Point { final int X; final int y; } Value Type
  14. 14. Primitive Type Value Type Complex Num Big Num Vector Tuple Reference Type
  15. 15. value class OptionalInt { private final int t;
  16. 16. _. ,4. «mad! 1 .1.” a x wfi ! .Ir. .
  17. 17. class Box<T> { private final T t; public Box(T t) { this. t = t; } public T get() { return t; } }
  18. 18. > javap -c -l Box class Box extends java. languObject{ private final java lang Object t; public Box(java lang Object); Code: public java lang Object get(); Code: 0: aload_0 1: getfield #2; / /Field t: Ljava/ lang/ Object; 4: areturn
  19. 19. public class Test { public static void main(String. ., args) { Box<Integer> box = new Box<>(10); Integer number = box. get(); } } T I la fi % public class Test { public static void main(String. ., args) { Box box = new Box(Integer. value0f(10)); Integer number = (Integer)box. get(); } }
  20. 20. Java Generics Type Erasure Method Type Parameter java. |ang. Object Primitive Type
  21. 21. Prmitive Wrapper Class Integer, Double et al. Autoboxing Autounboxing Expensive Computation
  22. 22. Specialization Box<int> box = new Box<>(10);
  23. 23. class Box<T> { private final T t; public Box(T t) { } } this. t = t3 public T get() { } return t; class Box { } private final public Box( this. t = } public return t; } ti
  24. 24. class Box{T= int} { private final int t; public Box(int t) { this. t = t; } public int get() { return t; } }
  25. 25. public javaalang. Object*T get(); Code: 0: aload_@ 1: getfield #2; / /Field t: LObject*T; 4: areturn*T f lfif"mi I I l “ ‘mi public int get(); Code: 0: aload_@ 1: getfield #2; / /Field tzint; 4: ireturn
  26. 26. Dark History lntStream lntFunction Optionallnt
  27. 27. Issues Assumption of Ref. Type T[] array = (T[])new Object[n]; from ArrayList Ref. - Primitive Overloading List#remove(int index); List#remove(Object o); Null
  28. 28. Project Panama ' Array 2.0 - ll {- 5‘ . u ‘ '*"~uu-'-cc -an I i ayout" ontol
  29. 29. int[][] nums =
  30. 30. int[][] nums = Header Array 2.0 1 2 5 6 Multi Dimension Index I} long Immutable
  31. 31. When Calling Native Code,
  32. 32. public interface @IgnoreError GetPid { long getPid(); ; GetPid getPid LibraryLoader ? getPid. getPid(); . create(GetPid. class) uload("c");
  33. 33. JNR JNR-JFFI JFFI libffi Native Code
  34. 34. JNR—UNIXSocket JNR—x86asm JNR—Constants JNR-JFFI JFFI l'ib'F‘F'i Native Code
  35. 35. Conclusion Much Faster Less Memory by Project Valhalla Project Panama
  36. 36. Java in the Box'' Yuichi Sakurabaf

×