This document provides an overview of Span<T> in .NET. It begins with background on memory management in .NET and value vs. reference types. It then defines Span<T> as a new value type that represents contiguous regions of memory, whether managed, unmanaged, or on the stack. It explains that Span<T> allows high-performance, low-overhead access to memory without unsafe code. Examples are given of using Span<T> to represent memory from arrays, strings, and other sources. Benchmarks show Span<T> outperforming alternatives like Substring. Real-world uses like parsing delimited strings are demonstrated.
**Return-oriented programming** bezeichnet eine gewiefte IT-Angriffstechnik, die im Prinzip eine Verallgemeinerung von *return-to-libc*-Attacken ist, welche wiederum zu den *stack buffer overflow exploits* gehören.
Wem das alles nichts sagt - keine Angst: Im Vortrag werden zunächst die Grundlagen von Puffer-Überläufen und deren Angriffspotential erläutert und einige historische Beispiele aufgezeigt, bevor schrittweise die Brücke zu **ROP** geschlagen wird. Zum Abschluss werden kurz einige Abwehrmaßnahmen vorgestellt und im Hinblick auf Umsetzbarkeit und Wirkungsgrad bewertet.
So die Demo-Götter es wollen, wird live u.A. ein Beispiel-Programm mithilfe von **ROP**-Tools gecrackt.
Short introduction to ROP which is a basic in computer security exploitation and implemented defenses. It contains useful links for further research at the end.
Introduction to return oriented programming. Explanation of how to use instruction sequences already existing in an executable's memory space to manipulate control flow without injecting external payload.
CNIT 127: Ch 4: Introduction to format string bugsSam Bowne
Slides for a college course at City College San Francisco. Based on "The Shellcoder's Handbook: Discovering and Exploiting Security Holes ", by Chris Anley, John Heasman, Felix Lindner, Gerardo Richarte; ASIN: B004P5O38Q.
Instructor: Sam Bowne
Class website: https://samsclass.info/127/127_F19.shtml
Why Is Concurrent Programming Hard? And What Can We Do about It?Stefan Marr
In short, I think, it is hard because on the one hand there is not a single concurrency abstraction that fits all problems, and on the other hand the various different abstractions are rarely designed to be used in combination with each other.
**Return-oriented programming** bezeichnet eine gewiefte IT-Angriffstechnik, die im Prinzip eine Verallgemeinerung von *return-to-libc*-Attacken ist, welche wiederum zu den *stack buffer overflow exploits* gehören.
Wem das alles nichts sagt - keine Angst: Im Vortrag werden zunächst die Grundlagen von Puffer-Überläufen und deren Angriffspotential erläutert und einige historische Beispiele aufgezeigt, bevor schrittweise die Brücke zu **ROP** geschlagen wird. Zum Abschluss werden kurz einige Abwehrmaßnahmen vorgestellt und im Hinblick auf Umsetzbarkeit und Wirkungsgrad bewertet.
So die Demo-Götter es wollen, wird live u.A. ein Beispiel-Programm mithilfe von **ROP**-Tools gecrackt.
Short introduction to ROP which is a basic in computer security exploitation and implemented defenses. It contains useful links for further research at the end.
Introduction to return oriented programming. Explanation of how to use instruction sequences already existing in an executable's memory space to manipulate control flow without injecting external payload.
CNIT 127: Ch 4: Introduction to format string bugsSam Bowne
Slides for a college course at City College San Francisco. Based on "The Shellcoder's Handbook: Discovering and Exploiting Security Holes ", by Chris Anley, John Heasman, Felix Lindner, Gerardo Richarte; ASIN: B004P5O38Q.
Instructor: Sam Bowne
Class website: https://samsclass.info/127/127_F19.shtml
Why Is Concurrent Programming Hard? And What Can We Do about It?Stefan Marr
In short, I think, it is hard because on the one hand there is not a single concurrency abstraction that fits all problems, and on the other hand the various different abstractions are rarely designed to be used in combination with each other.
Slides for a college course at City College San Francisco. Based on "The Shellcoder's Handbook: Discovering and Exploiting Security Holes ", by Chris Anley, John Heasman, Felix Lindner, Gerardo Richarte; ASIN: B004P5O38Q.
Instructor: Sam Bowne
Class website: https://samsclass.info/127/127_F19.shtml
Measuring the time spent on small individual fractions of program code is a common technique for analysing performance behavior and detecting performance bottlenecks. The benefits of the approach include a detailed individual attribution of performance and understandable feedback loops when experimenting with different code versions. There are however severe pitfalls when following this approach that can lead to vastly misleading results. Modern dynamic compilers use complex optimisation techniques that take a large part of the program into account. There can be therefore unexpected side-effects when combining different code snippets or even when running a presumably unrelated part of the code. This talk will present performance paradoxes with examples from the domain of dynamic compilation of Java programs. Furthermore, it will discuss an alternative approach to modelling code performance characteristics that takes the challenges of complex optimising compilers into account.
Everything You Need to Know About the Intel® MPI LibraryIntel® Software
A diversity of platforms makes it impossible for message passing interface (MPI) libraries to automatically provide the best performance for all existing applications. The Intel® MPI Library is not a black box. Instead, it contains several features that allow users to enhance MPI applications. Discover a large spectrum of possibilities from this library that improve performance of parallel applications on high-performance computing (HPC) systems.
Slides for a college course at City College San Francisco. Based on "The Shellcoder's Handbook: Discovering and Exploiting Security Holes ", by Chris Anley, John Heasman, Felix Lindner, Gerardo Richarte; ASIN: B004P5O38Q.
Instructor: Sam Bowne
Class website: https://samsclass.info/127/127_F18.shtml
This presentation goes over basic exploitation techniques. Topics include:
- Introduction to x86 paradigms used exploited by these techniques
- Stack overflows including the classic stack smashing attack
- Ret2libc
- Format string exploits
- Heap overflows and metadata corruption attacks
Arduino C maXbox web of things slide showMax Kleiner
RGB LED in Arduino
• Generating QR Code
• 3D Printing
• Web Video Cam
• Digi Clock with Real Time Clock
• Android SeekBar to Arduino LED Matrix
The second part is about new ideas, prototyping and new technologies that are in the lab. It’s
about research papers, and software philosophy, and about researchers worldwide.
Survey of Program Transformation TechnologiesChunhua Liao
The first workshop for conceptualization of a Software Institute for Abstractions and Methodologies for HPC Simulations Codes on Future Architectures. Dec. 10th, 2012 Chicago, IL, USA
If you are building a service oriented system and you want to build it for scale as well as flexibility. There are a few questions you need to make sure are asked and answered regarding the data interchange between services and offline persistency of services data. Questions as:
- How can I change a service API without breaking other services?
- How do I keep data from services consistent over time?
This talk covers the challenges we tackled during building our new service oriented system. Summarizing what we realized would bad Ideas to do, what are the better approaches to data consistency.
It includes a dive into the Apache Avro technology and how we used it.
Also what other supporting infrastructure we created to help us achieving the goal of consistent yet flexible system.
These are Java ways of functional style; pragmatic ways of understanding and introducing Lambda/Functional API.
你可以在以下找到中文說明:
http://www.codedata.com.tw/java/jdk8-functional-api/
TensorFlow 2.0 Autographs - For TensorFlow User Group Toronto by Vik Pant. Presented at TFUG meetup on TensorFlow for Banking & Financial Services on 22nd May, 2019.
Five cool ways the JVM can run Apache Spark fasterTim Ellison
The IBM JVM runs Apache Spark fast! This talk explains some of the findings and optimizations from our experience of running Spark workloads.
The talk was originally presented at the SparkEU Summit 2015 in Amsterdam.
Title: Sista: Improving Cog’s JIT performance
Speaker: Clément Béra
Thu, August 21, 9:45am – 10:30am
Video Part1
https://www.youtube.com/watch?v=X4E_FoLysJg
Video Part2
https://www.youtube.com/watch?v=gZOk3qojoVE
Description
Abstract: Although recent improvements of the Cog VM performance made it one of the fastest available Smalltalk virtual machine, the overhead compared to optimized C code remains important. Efficient industrial object oriented virtual machine, such as Javascript V8's engine for Google Chrome and Oracle Java Hotspot can reach on many benchs the performance of optimized C code thanks to adaptive optimizations performed their JIT compilers. The VM becomes then cleverer, and after executing numerous times the same portion of codes, it stops the code execution, looks at what it is doing and recompiles critical portion of codes in code faster to run based on the current environment and previous executions.
Bio: Clément Béra and Eliot Miranda has been working together on Cog's JIT performance for the last year. Clément Béra is a young engineer and has been working in the Pharo team for the past two years. Eliot Miranda is a Smalltalk VM expert who, among others, has implemented Cog's JIT and the Spur Memory Manager for Cog.
Slides for a college course at City College San Francisco. Based on "The Shellcoder's Handbook: Discovering and Exploiting Security Holes ", by Chris Anley, John Heasman, Felix Lindner, Gerardo Richarte; ASIN: B004P5O38Q.
Instructor: Sam Bowne
Class website: https://samsclass.info/127/127_F19.shtml
Measuring the time spent on small individual fractions of program code is a common technique for analysing performance behavior and detecting performance bottlenecks. The benefits of the approach include a detailed individual attribution of performance and understandable feedback loops when experimenting with different code versions. There are however severe pitfalls when following this approach that can lead to vastly misleading results. Modern dynamic compilers use complex optimisation techniques that take a large part of the program into account. There can be therefore unexpected side-effects when combining different code snippets or even when running a presumably unrelated part of the code. This talk will present performance paradoxes with examples from the domain of dynamic compilation of Java programs. Furthermore, it will discuss an alternative approach to modelling code performance characteristics that takes the challenges of complex optimising compilers into account.
Everything You Need to Know About the Intel® MPI LibraryIntel® Software
A diversity of platforms makes it impossible for message passing interface (MPI) libraries to automatically provide the best performance for all existing applications. The Intel® MPI Library is not a black box. Instead, it contains several features that allow users to enhance MPI applications. Discover a large spectrum of possibilities from this library that improve performance of parallel applications on high-performance computing (HPC) systems.
Slides for a college course at City College San Francisco. Based on "The Shellcoder's Handbook: Discovering and Exploiting Security Holes ", by Chris Anley, John Heasman, Felix Lindner, Gerardo Richarte; ASIN: B004P5O38Q.
Instructor: Sam Bowne
Class website: https://samsclass.info/127/127_F18.shtml
This presentation goes over basic exploitation techniques. Topics include:
- Introduction to x86 paradigms used exploited by these techniques
- Stack overflows including the classic stack smashing attack
- Ret2libc
- Format string exploits
- Heap overflows and metadata corruption attacks
Arduino C maXbox web of things slide showMax Kleiner
RGB LED in Arduino
• Generating QR Code
• 3D Printing
• Web Video Cam
• Digi Clock with Real Time Clock
• Android SeekBar to Arduino LED Matrix
The second part is about new ideas, prototyping and new technologies that are in the lab. It’s
about research papers, and software philosophy, and about researchers worldwide.
Survey of Program Transformation TechnologiesChunhua Liao
The first workshop for conceptualization of a Software Institute for Abstractions and Methodologies for HPC Simulations Codes on Future Architectures. Dec. 10th, 2012 Chicago, IL, USA
If you are building a service oriented system and you want to build it for scale as well as flexibility. There are a few questions you need to make sure are asked and answered regarding the data interchange between services and offline persistency of services data. Questions as:
- How can I change a service API without breaking other services?
- How do I keep data from services consistent over time?
This talk covers the challenges we tackled during building our new service oriented system. Summarizing what we realized would bad Ideas to do, what are the better approaches to data consistency.
It includes a dive into the Apache Avro technology and how we used it.
Also what other supporting infrastructure we created to help us achieving the goal of consistent yet flexible system.
These are Java ways of functional style; pragmatic ways of understanding and introducing Lambda/Functional API.
你可以在以下找到中文說明:
http://www.codedata.com.tw/java/jdk8-functional-api/
TensorFlow 2.0 Autographs - For TensorFlow User Group Toronto by Vik Pant. Presented at TFUG meetup on TensorFlow for Banking & Financial Services on 22nd May, 2019.
Five cool ways the JVM can run Apache Spark fasterTim Ellison
The IBM JVM runs Apache Spark fast! This talk explains some of the findings and optimizations from our experience of running Spark workloads.
The talk was originally presented at the SparkEU Summit 2015 in Amsterdam.
Title: Sista: Improving Cog’s JIT performance
Speaker: Clément Béra
Thu, August 21, 9:45am – 10:30am
Video Part1
https://www.youtube.com/watch?v=X4E_FoLysJg
Video Part2
https://www.youtube.com/watch?v=gZOk3qojoVE
Description
Abstract: Although recent improvements of the Cog VM performance made it one of the fastest available Smalltalk virtual machine, the overhead compared to optimized C code remains important. Efficient industrial object oriented virtual machine, such as Javascript V8's engine for Google Chrome and Oracle Java Hotspot can reach on many benchs the performance of optimized C code thanks to adaptive optimizations performed their JIT compilers. The VM becomes then cleverer, and after executing numerous times the same portion of codes, it stops the code execution, looks at what it is doing and recompiles critical portion of codes in code faster to run based on the current environment and previous executions.
Bio: Clément Béra and Eliot Miranda has been working together on Cog's JIT performance for the last year. Clément Béra is a young engineer and has been working in the Pharo team for the past two years. Eliot Miranda is a Smalltalk VM expert who, among others, has implemented Cog's JIT and the Spur Memory Manager for Cog.
The .NET Garbage Collector (GC) is really cool. It helps providing our applications with virtually unlimited memory, so we can focus on writing code instead of manually freeing up memory. But how does .NET manage that memory? What are hidden allocations? Are strings evil? It still matters to understand when and where memory is allocated. In this talk, we’ll go over the base concepts of .NET memory management and explore how .NET helps us and how we can help .NET – making our apps better. Expect profiling, Intermediate Language (IL), ClrMD and more!
Scale confidently. From laptop to lots of nodes to multi-cluster, multi-use case deployments, Elastic experts are sharing best practices to master and pitfalls to avoid when it comes to scaling Elasticsearch.
The .NET Garbage Collector (GC) is really cool. It helps providing our applications with virtually unlimited memory, so we can focus on writing code instead of manually freeing up memory. But how does .NET manage that memory? What are hidden allocations? Are strings evil? It still matters to understand when and where memory is allocated. In this talk, we’ll go over the base concepts of .NET memory management and explore how .NET helps us and how we can help .NET – making our apps better. Expect profiling, Intermediate Language (IL), ClrMD and more!
Slides for a college course at City College San Francisco. Based on "The Shellcoder's Handbook: Discovering and Exploiting Security Holes ", by Chris Anley, John Heasman, Felix Lindner, Gerardo Richarte; ASIN: B004P5O38Q.
Instructor: Sam Bowne
Class website: https://samsclass.info/127/127_S17.shtml
Игорь Фесенко "Direction of C# as a High-Performance Language"Fwdays
There are a lot of upcoming performance changes in .NET. Starting from code generation (JIT, AOT) and optimizations that can be performed by the compiler (inlining, flowgraph & loop analysis, dead code elimination, SIMD, stack allocation and so on). In this talk we will cover some features of C# 7 are going towards making low level optimization.
I will share not only how we can improve performance with the next version of .NET, but how we can do it today using different techniques and tools like Roslyn analyzers, Channels (Push based Streams), System.Slices, System.Buffers and System.Runtime.CompilerServices.Unsafe.
How to approach a problem from a performance standpoint. A small real world application is used as a case study.
I\'ve presented "High Performance With Java" at Codebits\'2008 held from 13 to 15 November 2008
(*) Codebits is a programming contest held in Portugal held the spirit of Yahoo Hack! Day
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...Intel® Software
Integrated into Intel® Advisor, Cache-aware Roofline Modeling (CARM) provides insight into how an application behaves by helping to determine a) how optimally it works on a given hardware, b) the main factors that limit performance, c) if the workload is memory or compute-bound, and d) the right strategy to improve application performance.
100 bugs in Open Source C/C++ projects Andrey Karpov
This article demonstrates capabilities of the static code analysis methodology. The readers are offered to study the samples of one hundred errors found in open-source projects in C/C++.
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...Alexandre Moneger
This presentation shows that code coverage guided fuzzing is possible in the context of network daemon fuzzing.
Some fuzzers are blackbox while others are protocol aware. Even ones which are made protocol aware, fuzzer writers typically model the protocol specification and implement packet awareness logic in the fuzzer. Unfortunately, just because the fuzzer is protocol aware, it does not guarantee that sufficient code paths have been reached.
The presentation deals with specific scenarios where the target protocol is completely unknown (proprietary) and no source code or protocol specs are accessible. The tool developed builds a feedback loop between the client and the server components using the concept of "gate functions". A gate function triggers monitoring. The pintool component tracks the binary code coverage for all the functions untill it reaches an exit gate. By instrumenting such gated functions, the tool is able to measure code coverage during packet processing.
The .NET Garbage Collector (GC) is really cool. It helps providing our applications with virtually unlimited memory, so we can focus on writing code instead of manually freeing up memory. But how does .NET manage that memory? What are hidden allocations? Are strings evil? It still matters to understand when and where memory is allocated. In this talk, we’ll go over the base concepts of .NET memory management and explore how .NET helps us and how we can help .NET – making our apps better. Expect profiling, Intermediate Language (IL), ClrMD and more!
The Java Virtual Machine (JVM) can deliver significantly better performance through the use of Just In Time compilation. However, each time you start an application it needs to repeat the same process of analysis and compilation. This session discusses Java with Co-ordinated Checkpoint at Restore. This is a way to freeze an application and start it again (potentially many times) from the same checkpoint.
Async Debugging A Practical Guide to survive !Mirco Vanini
The speech talk about the specialised tools inside visual studio to survive from async code bugs with special look about how to write a right async code
Async Debugging - A Practical Guide to survive !Mirco Vanini
The speech talk about the specialised tools inside visual studio to survive from async code bugs with special look about how to write a right async code
An introduction about how to migration from .NET Full FW to .NET Core 3.0 for your WPF & Windows Forms applications and the incrementally modernizing with Windows 10 features
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
2. Agenda
• Back to Basics
• The problem
• What is Span<T>?
• What is Memory<T>?
20/09/2019 2
3. Back to Basics
• .NET is a managed platform, that means the memory access
and management is safe and automatic. All types are fully
managed by .NET, it allocates memory either on the
execution stacks, or managed heaps.
20/09/2019 3
4. Back to Basics
• .NET is a managed platform, that means the memory access
and management is safe and automatic. All types are fully
managed by .NET, it allocates memory either on the
execution stacks, or managed heaps.
• In .NET world, there are three types of memory:
• Managed heap memory, such as an array;
• Stack memory, such as objects created by stackalloc;
• Native memory, such as a native pointer reference.
20/09/2019 3
5. Back to Basics
20/09/2019 4
Reference Types
• class keyword
• Allocated on heap
• A variable for a reference type is a
reference to the thing on the heap
not the object
• Passed around by reference
Assignment is a copy of the
reference,
Value Types
• struct keyword
• Allocated on stack or embedded
into a reference object
• A variable for a value type is the
value itself, e.g. integer
• Passed around by value (i.e.
copied)
• Assignment is a copy of the whole
value
11. The problem
• In many applications, the most CPU consuming operations
are string operations. If you run a profiler session against
your application, you may find the fact that 95% of the CPU
time is used to call string and related functions.
20/09/2019 8
12. The problem
• In many applications, the most CPU consuming operations
are string operations. If you run a profiler session against
your application, you may find the fact that 95% of the CPU
time is used to call string and related functions.
• Trim() or SubString() returns a new string object that is part of the original string,
this is unnecessary if there is a way to slice and return a portion of the original
string to save one copy.
20/09/2019 8
13. The problem
• In many applications, the most CPU consuming operations
are string operations. If you run a profiler session against
your application, you may find the fact that 95% of the CPU
time is used to call string and related functions.
• Trim() or SubString() returns a new string object that is part of the original string,
this is unnecessary if there is a way to slice and return a portion of the original
string to save one copy.
• IsNullOrWhiteSpace() takes a string object that needs a memory copy (because
string is immutable.)
20/09/2019 8
14. The problem
• In many applications, the most CPU consuming operations
are string operations. If you run a profiler session against
your application, you may find the fact that 95% of the CPU
time is used to call string and related functions.
• Trim() or SubString() returns a new string object that is part of the original string,
this is unnecessary if there is a way to slice and return a portion of the original
string to save one copy.
• IsNullOrWhiteSpace() takes a string object that needs a memory copy (because
string is immutable.)
• Specifically, string concatenation is expensive, it takes n string objects,
makes n copy, generate n - 1 temporary string objects, and return a final string
object, the n – 1 copies can be eliminated if there is a way to get direct access to
the return string memory and perform sequential writes.
20/09/2019 8
15. GC Managed Heap (Workstation mode)
• Mark
• Starting from the roots, mark all reachable objects as alive
• In Background
• Sweep
• Turning all non-reachable objects into a free space
• Blocking
• Compact
• To prevent fragmentation
• Not always
• Blocking
20/09/2019 9
16. GC Managed Heap (Workstation mode)
• Mark
• Starting from the roots, mark all reachable objects as alive
• In Background
• Sweep
• Turning all non-reachable objects into a free space
• Blocking
• Compact
• To prevent fragmentation
• Not always
• Blocking
20/09/2019 9
17. GC Managed Heap (Workstation mode)
• Mark
• Starting from the roots, mark all reachable objects as alive
• In Background
• Sweep
• Turning all non-reachable objects into a free space
• Blocking
• Compact
• To prevent fragmentation
• Not always
• Blocking
20/09/2019 9
18. GC Managed Heap (Workstation mode)
• Mark
• Starting from the roots, mark all reachable objects as alive
• In Background
• Sweep
• Turning all non-reachable objects into a free space
• Blocking
• Compact
• To prevent fragmentation
• Not always
• Blocking
20/09/2019 9
19. GC Managed Heap (Workstation mode)
• Mark
• Starting from the roots, mark all reachable objects as alive
• In Background
• Sweep
• Turning all non-reachable objects into a free space
• Blocking
• Compact
• To prevent fragmentation
• Not always
• Blocking
20/09/2019 9
Middle Ground between Server and Workstation GC by Maoni
Running with Server GC in a Small Container Scenario Part 0 by Maoni
20. Reference Semantics with Value Types (C# 7.2)
• inparameters
• Pass value type by reference. Called method cannot modify it
• ref locals and ref returns (C# 7.0)
• ref readonly returns
• Return a read only value type by reference
• readonly struct
• Immutable value types
• ref struct
• Stack only value types
20/09/2019 10
Write safe and efficient C# code
21. What is Span<T>?
20/09/2019 11
“System.Span<T> is a new value type at the
heart of .NET [that] enables the representation
of contiguous regions of arbitrary memory.”
“Span<T> is a small, but critical, building block
for a much larger effort to provide .NET APIs to
enable development of high scalability server
applications.”
Stephen Toub, MSDN Magazine, January 2018
dotnet/corefxlab
22. What is Span<T>?
20/09/2019 12
“System.Span<T> is a new value type at the
heart of .NET [that] enables the representation
of contiguous regions of arbitrary memory.”
23. What is Span<T>?
20/09/2019 12
“System.Span<T> is a new value type at the
heart of .NET [that] enables the representation
of contiguous regions of arbitrary memory.”
• Struct
• Part of System.Memory, available on Nuget
• .NET Standard 1.1 so can be used in .NET 4.5+
• Slow Span (.NET Standard)
• Fast Span (.NET Core)
• C# 7.2-ish .NET API Catalog
24. What is Span<T>?
20/09/2019 13
“System.Span<T> is a new value type at the
heart of .NET [that] enables the representation
of contiguous regions of arbitrary memory.”
25. What is Span<T>?
20/09/2019 13
“System.Span<T> is a new value type at the
heart of .NET [that] enables the representation
of contiguous regions of arbitrary memory.”
• High performance O(1), low (no) overhead
• Framework, CLR, JIT and GC support
• Provides memory and type safety
• Avoids the need for unsafe code
• Value Type
Span design document
26. What is Span<T>?
20/09/2019 14
“System.Span<T> is a new value type at the
heart of .NET [that] enables the representation
of contiguous regions of arbitrary memory.”
27. What is Span<T>?
20/09/2019 14
“System.Span<T> is a new value type at the
heart of .NET [that] enables the representation
of contiguous regions of arbitrary memory.”
• Native/unmanaged memory (P/Invoke)
• Managed memory (.NET types)
• Stack memory (stackalloc)
Span<byte> stackMemory = stackalloc byte[256]; // C# 7.2
IntPtr unmanagedHandle = Marshal.AllocHGlobal(256);
Span<byte> unmanaged = new Span<byte>(unmanagedHandle.ToPointer(), 256);
char[] array = new char[] {'i','m','p','l','i','c','i','t’ };
Span<char> fromArray = array; // implicit cast
ReadOnlySpan<char> fromString = "Spanification".AsSpan();
28. What is Span<T>?
20/09/2019 15
0x01
871
Stack
871
YGG871
Heap
0x01
0x02
0x03
0x04
0x05
0x06plate
num
string plate = “YGG871”;
plate = plate.Substring(3);
int num = int.Parse(plate);
29. What is Span<T>?
20/09/2019 15
0x01
871
Stack
871
YGG871
Heap
0x01
0x02
0x03
0x04
0x05
0x06
num
0x02
string plate = “YGG871”;
plate = plate.Substring(3);
int num = int.Parse(plate);
plate
30. span
What is Span<T>?
20/09/2019 16
0x01
0x01
0->3
6
871
Stack
871
YGG871
Heap
0x01
0x02
0x03
0x04
0x05
0x06plate
num
length
offset
pointer
string plate = “YGG871”;
ReadOnlySpan<char> s = plate.AsSpan();
s = s.Slice(3);
int num = int.Parse(s);
.NET Framework 4.5+ - slow span
31. span
What is Span<T>?
20/09/2019 16
0x01
0x01
0->3
6
871
Stack
871
YGG871
Heap
0x01
0x02
0x03
0x04
0x05
0x06plate
num
length
offset
pointer
string plate = “YGG871”;
ReadOnlySpan<char> s = plate.AsSpan();
s = s.Slice(3);
int num = int.Parse(s);
span
0x01+3
6->3length
pointer
.NET Framework 4.5+ - slow span.NET Core 2.0+ – fast span
32. DEMO
20/09/2019 17
Span<T>
* Legends *
ItemCount : Value of the 'ItemCount' parameter
Mean : Arithmetic mean of all measurements
Error : Half of 99.9% confidence interval
StdDev : Standard deviation of all measurements
Ratio : Mean of the ratio distribution ([Current]/[Baseline])
RatioSD : Standard deviation of the ratio distribution ([Current]/[Baseline])
Rank : Relative position of current benchmark mean among all benchmarks (Arabic style)
Gen 0 : GC Generation 0 collects per 1000 operations
Gen 1 : GC Generation 1 collects per 1000 operations
Gen 2 : GC Generation 2 collects per 1000 operations
Allocated : Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)
1 ms : 1 Millisecond (0.001 sec)
34. When do mere mortals use it?
20/09/2019 19
var str = "EGOR 3.14 1234 7/3/2018";
string name = str.Substring(0, 4);
float pi = float.Parse(str.Substring(5, 4));
int number = int.Parse(str.Substring(10, 4));
DateTime date = DateTime.Parse(str.Substring(15, 8));
35. When do mere mortals use it?
20/09/2019 19
var str = "EGOR 3.14 1234 7/3/2018";
string name = str.Substring(0, 4);
float pi = float.Parse(str.Substring(5, 4));
int number = int.Parse(str.Substring(10, 4));
DateTime date = DateTime.Parse(str.Substring(15, 8));
Allocated on heap: 168 bytes
var str = "EGOR 3.14 1234 7/3/2018".AsSpan();
string name = str.Slice(0, 4);
float pi = float.Parse(str.Slice(5, 4));
int number = int.Parse(str.Slice(10, 4));
DateTime date = DateTime.Parse(str.Slice(15, 8));
Allocated on heap: 0 bytes
36. Span - The Limitations
20/09/2019 20
• Can only live on the stack
• Implemented as a ref struct
• Can only be contained by ref structs
ref structs
Structs that can exist only on the stack. New in C# 7.2
• Can’t implement interfaces
• Can’t be used as generic type arguments
• Can’t be boxed to object
• Can’t be passed in to - or used in places inside - of async
methods, iterators, nested functions or query expressions
37. Memory<T>
20/09/2019 21
• “Normal” struct
• Not as performant as Span
• Can be used in more places than Span (ie, doesn’t have the
limitations)
• Use the Span property to access the underlying memory
async Task DoSomethingAsync(Span<byte> buffer) // <-- error
{
buffer[0] = 0;
await Something(); // Bang!
buffer[0] = 1;
}
async Task DoSomethingAsync(Memory<byte> buffer)
{
buffer.Span[0] = 0;
await Something(); // Totally fine
buffer.Span[0] = 1;
}
40. Recap
20/09/2019 24
• Span<T> makes it easy and safe to use any
kind of memory
• System.Memory package, C# 7.2
• Memory<T> has no stack-only limitations
• Don’t copy memory! Slice it!
• Prefer read-only versions over mutable ones
• Prefer safe managed memory over native
memory
42. 20/09/2019 25
Who I am
www.proxsoft.it
info@proxsoft.it
@MircoVanini
Mirco Vanini
Microsoft® MVP Windows Development
AllSeen Alliance - AllJoyn® Ambassador
Open Connectivity Foundation - OCF® Ambassador
43. Is C# a low-level language?
What language features of C#/F#/VB.NET or
BCL / Runtime functionality enable ‘low-level’
programming ?
20/09/2019 26
44. Is C# a low-level language?
What language features of C#/F#/VB.NET or
BCL / Runtime functionality enable ‘low-level’
programming ?
20/09/2019 26
Any C# developer is going to have a different
idea of what ‘low-level’ means, these features
would be taken for granted by C++ or Rust
programmers.
45. Is C# a low-level language?
• ref returns and ref locals: pass and return by reference to avoid
large struct copying. It can be even faster than unsafe ! link
• Unsafe code in .NET: is the part of the program that runs outside
the control of the Common Language Runtime of the .NET
frameworks. link
• Managed pointers in .NET: It could be defined as a more general
type of reference, which may point to other locations than just the
beginning of an object. link
• Span<T> and universal memory management: this presentation…
link
• Interoperability: interoperability with unmanaged code through
platform invoke services, C/C++ interoperability, and COM
interoperability (COM interop). link
20/09/2019 27