FONForum http://www.fonforum.org/ |
|
[Java] Javolution http://www.fonforum.org/viewtopic.php?f=8&t=2469 |
Stranica 1 od 1 |
Autoru: | zAkiLi [ 28.11.2004. 14:11:54 ] |
Tema posta: | [Java] Javolution |
Za sve one koji programiraju u javi. Pogledajte http://javolution.org/ Opis je veoma slikovito predstavljen ![]() |
Autoru: | zlatko [ 30.11.2004. 15:44:44 ] |
Tema posta: | |
Skinuo sam javolution ali se na mom testu nije pokazao toliko dobro kako su oni pisali i prikazali na testu: Kod: Javolution - Java(TM) Solution for Real-Time and Embedded Systems
Version 2.0.2 November 28 2004 (http://javolution.org) Benchmark... //////////////////////////// // Package: javolution.io // //////////////////////////// ////////////////////////////// // Package: javolution.lang // ////////////////////////////// -- String/StringBuffer/StringBuilder versus Text/TextBuilder -- "Concatenates this line one hundred times (resulting in a text of about 8000 characters)" String "+" operator: 17.32ms StringBuffer "append": 249.0µs StringBuilder "append": 1.958ms Text "plus" (heap): 133.0µs Text "plus" (stack): 72.0µs TextBuilder "append": 84.0µs ////////////////////////////////// // Package: javolution.realtime // ////////////////////////////////// -- Heap versus Stack Allocation (Pool-Context) -- Object heap creation: 156.1ns Object stack creation: 110.8ns char[128] heap creation: 7.83µs char[128] stack creation: 191.0ns char[256] heap creation: 34.083µs char[256] stack creation: 172.0ns ////////////////////////////// // Package: javolution.util // ////////////////////////////// -- HashMap/LinkedMap versus FastMap -- HashMap Creates/populates map of 200 entries: 100.76µs Access (get): 124.7ns Iterates through all map entries: 32.14µs LinkedHashMap Creates/populates map of 200 entries: 121.6µs Access (get): 161.8ns Iterates through all map entries: 16.8µs FastMap Creates/populates map of 200 entries: 57.24µs Access (get): 137.8ns Iterates through all map entries: 19.42µs Statistics: SIZE: 200, CAPACITY: 256, AVG COLLISIONS: 31%, MAX SLOT OCCUPANCY: 5 -- HashSet/LinkedHashSet/TreeSet versus FastSet -- HashSet Creates/populates set of 200 elements: 108.02µs Access (contains): 152.0ns Iterates through all set elements: 33.36µs LinkedHashSet Creates/populates set of 200 elements: 125.82µs Access (contains): 171.1ns Iterates through all set elements: 17.46µs FastSet Creates/populates set of 200 elements: 63.16µs Access (contains): 187.1ns Iterates through all set elements: 19.5µs -- ArrayList/LinkedList versus FastList -- ArrayList Creates new list and appends 200 elements: 31.62µs Iterates through all list elements: 27.64µs LinkedList Creates new list and appends 200 elements: 45.88µs Iterates through all list elements: 14.68µs FastList Creates new list and appends 200 elements: 40.64µs Iterates through all list elements: 20.42µs ///////////////////////////// // Package: javolution.xml // ///////////////////////////// -- Default Java(TM) Serialization (stream-based) -- Time: 1893.0ms -- XML Serialization using IO (Stream) -- Time: 749.0ms -- XML Serialization using NIO (ByteBuffer) -- Time: 492.0ms More performance analysis in future versions... Iznenadila me klasa StringBuilder. Ona ima identični interfejs kao StringBuffer i jedina razlika je što nije sinhronizovana. Sun je lansirao StringBuilder u Javi 5 kao zamenu za StringBuffer, koji je zbog sinhronizacije trošio resure, a evo pokaza se da ne samo što StringBuilder nije ništa brži već je značajno sporiji. Ovaj projekat pokazuje koliko još prostora postoji za štelovanje i razvijanje javinih klasa i virtuelne mašine. Pogledao sam i jScience biblioteku. Ima vrlo zanimljivih klasa, za numeričku analizu dušu dalo. |
Stranica 1 od 1 | Sva vremena su u UTC + 1 sat |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |