logging in or signing up Kris Array Slicing george Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINTLite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 167 Category: Education License: All Rights Reserved Like it (0) Dislike it (0) Added: January 07, 2008 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Array Slicing fo’Shizzle!: Array Slicing fo’ Shizzle! © Kris 2007Some Background: Some Background 2001: Web servers (Tomcat, Resin, WebLogic, etc) 2002: Bull in a china shop A Java Enigma: A Java Enigma Overt GC reliance has potential to make any language or system appear sluggish Java has few easy-to-apply alternatives Libraries & systems can appear GC-bound GC can be a synchronization bottleneck Yet, Java flourished on the serverGC Pressure Reduction: GC Pressure Reduction Low-level access to malloc/free Precision new & delete overrides Temporal struct or class on the stack Free-lists Array slicing Array Slicing fo’ Shizzle!: Array Slicing fo’ Shizzle! Easy-to-use array aliasing Native to the language auto slice = array [start .. end]; Three Use-Cases: Three Use-Cases Text Processing Sliced HTTP Clustering with Tina1: Integer as Text: 1: Integer as Text char[] uitoa (uint val, char[] output=null) { if (output.length < unit.dig) output.length = uint.dig; auto len = output.length; do { output [--len] = val % 10; } while (val /= 10); return output [len .. $]; }1: UTF Conversion: 1: UTF Conversion dchar[] toUtf32 (char[] input, dchar[] output=null) { if (output.length < input.length) output.length = input.length; // convert input utf8 into output utf32 // … return output [0 .. len]; }1: Parsing Lines of Text: 1: Parsing Lines of Text // option 1 via an array foreach (line; splitLines (myText)) … The quick brown fox jumped over the lazy dog How now brown cow The rain in Spain falls mostly on the plain // option 2 via opApply foreach (line; lines (myText)) …2: Sliced HTTP: 2: Sliced HTTP Client 2: Sliced HTTP Server: 2: Sliced HTTP Server Cookies Headers URI Request structured alias input buffer overlap optional2: Thread Local Storage: 2: Thread Local Storage3: Clustering Model: 3: Clustering Model Bulletin Task Queue Cache3: Model Services: 3: Model Services Bulletin Task Queue Cache put (msg) get () put (key, msg) get (key, remove) execute (msg) broadcast (msg)3: Tina: 3: Tina High performance Peer to peer design (no SPOF) Serialized D objects Near zero GC activity3: Storage Request: 3: Storage Request Client Object buffer 3: Task Request: 3: Task Request Tango Connection: Tango Connection Text processing supports slicing Conversion Tokenizing Streaming Utilities IO subsystem supports slicing Protocol readers (allocators) BufferingWrap-up: Wrap-up Overt GC reliance has potential to make any language or system appear sluggish Array slicing can be a powerful alternative D libraries & systems can easily be GC-lite Less multi-thread contention Show some GC loveThank You: Thank You You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
Kris Array Slicing george Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINTLite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 167 Category: Education License: All Rights Reserved Like it (0) Dislike it (0) Added: January 07, 2008 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Array Slicing fo’Shizzle!: Array Slicing fo’ Shizzle! © Kris 2007Some Background: Some Background 2001: Web servers (Tomcat, Resin, WebLogic, etc) 2002: Bull in a china shop A Java Enigma: A Java Enigma Overt GC reliance has potential to make any language or system appear sluggish Java has few easy-to-apply alternatives Libraries & systems can appear GC-bound GC can be a synchronization bottleneck Yet, Java flourished on the serverGC Pressure Reduction: GC Pressure Reduction Low-level access to malloc/free Precision new & delete overrides Temporal struct or class on the stack Free-lists Array slicing Array Slicing fo’ Shizzle!: Array Slicing fo’ Shizzle! Easy-to-use array aliasing Native to the language auto slice = array [start .. end]; Three Use-Cases: Three Use-Cases Text Processing Sliced HTTP Clustering with Tina1: Integer as Text: 1: Integer as Text char[] uitoa (uint val, char[] output=null) { if (output.length < unit.dig) output.length = uint.dig; auto len = output.length; do { output [--len] = val % 10; } while (val /= 10); return output [len .. $]; }1: UTF Conversion: 1: UTF Conversion dchar[] toUtf32 (char[] input, dchar[] output=null) { if (output.length < input.length) output.length = input.length; // convert input utf8 into output utf32 // … return output [0 .. len]; }1: Parsing Lines of Text: 1: Parsing Lines of Text // option 1 via an array foreach (line; splitLines (myText)) … The quick brown fox jumped over the lazy dog How now brown cow The rain in Spain falls mostly on the plain // option 2 via opApply foreach (line; lines (myText)) …2: Sliced HTTP: 2: Sliced HTTP Client 2: Sliced HTTP Server: 2: Sliced HTTP Server Cookies Headers URI Request structured alias input buffer overlap optional2: Thread Local Storage: 2: Thread Local Storage3: Clustering Model: 3: Clustering Model Bulletin Task Queue Cache3: Model Services: 3: Model Services Bulletin Task Queue Cache put (msg) get () put (key, msg) get (key, remove) execute (msg) broadcast (msg)3: Tina: 3: Tina High performance Peer to peer design (no SPOF) Serialized D objects Near zero GC activity3: Storage Request: 3: Storage Request Client Object buffer 3: Task Request: 3: Task Request Tango Connection: Tango Connection Text processing supports slicing Conversion Tokenizing Streaming Utilities IO subsystem supports slicing Protocol readers (allocators) BufferingWrap-up: Wrap-up Overt GC reliance has potential to make any language or system appear sluggish Array slicing can be a powerful alternative D libraries & systems can easily be GC-lite Less multi-thread contention Show some GC loveThank You: Thank You