F# High Performance
eBook - ePub

F# High Performance

Eriawan Kusumawardhono

Compartir libro
  1. 338 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

F# High Performance

Eriawan Kusumawardhono

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Build powerful and fast applications with F#

About This Book

  • Explore the advanced concurrency support in F# and.NET TPL
  • Covers major optimization techniques in F# to improve the performance of applications
  • Use Struct, Class and Record model, Interop with C# and VB without sacrificing performance.

Who This Book Is For

This book is for F# developers who want to build high-performance applications. Knowledge of functional programming would be helpful.

What You Will Learn

  • Understand how the execution of functions in F# works
  • Identify common performance bottlenecks
  • Implement best practices to optimize performance
  • Use the available tooling to help measure performance
  • Combine the best practice of asynchronous and synchronous
  • Optimize further using various F# language constructs

In Detail

F# is a functional programming language and is used in enterprise applications that demand high performance. It has its own unique trait: it is a functional programming language and has OOP support at the same time.

This book will help you make F# applications run faster with examples you can easily break down and take into your own work. You will be able to assess the performance of the program and identify bottlenecks.

Beginning with a gentle overview of concurrency features in F#, you will get to know the advanced topics of concurrency optimizations in F#, such as F# message passing agent of MailboxProcessor and further interoperation with.NET TPL. Based on this knowledge, you will be able to enhance the performance optimizations when implementing and using other F# language features.

The book also covers optimization techniques by using F# best practices and F# libraries. You will learn how the concepts of concurrency and parallel programming will help in improving the performance. With this, you would be able to take advantage of multi-core processors and track memory leaks, root causes, and CPU issues.

Finally, you will be able to test their applications to achieve scalability.

Style and approach

This easy-to-follow guide is full of hands-on examples of real-world multithreading tasks. Each topic is explained and placed in context, and for the more inquisitive, there are also more in-depth details of the concepts used.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es F# High Performance un PDF/ePUB en línea?
Sí, puedes acceder a F# High Performance de Eriawan Kusumawardhono en formato PDF o ePUB, así como a otros libros populares de Computer Science y Programming Languages. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2017
ISBN
9781786468079
Edición
1

F# High Performance


F# High Performance

Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: January 2017
Production reference: 1130117
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78646-807-9
www.packtpub.com

Credits

Author
Eriawan Kusumawardhono
Copy Editor
Safis Editing
Reviewer
Arthur Pham
Project Coordinator
Ulhas Kambli
Commissioning Editor
Kunal Parikh
Proofreader
Safis Editing
Acquisition Editor
Sonali Vernekar
Indexer
Tejal Daruwale Soni
Content Development Editor
Nikhil Borkar
Graphics
Abhinash Sahu
Technical Editor
Hussain Kanchwala
Production Coordinator
Shraddha Falebhai

About the Author

Eriawan Kusumawardhono is a veteran senior software development engineer (SDE) who has software development experience of more than 13 years, with 11 years of having developed in .NET, since the introduction of Visual Studio 2003. On usual working day he works at Allegro Development, a software development company, and in his spare time, he does speaking and training for software development and programming language communities in Indonesia. He is also a member of F# Foundation speaker program. He enjoys being a full-time technical polyglot software developer, mingling both OOP and functional programming at the same time.
He currently holds a Microsoft MVP award in Visual Studio development platform competency, from 2011 to 2017, for more than 5 consecutive years.
He lives in Jakarta with his wife, enjoying reading and cooking heterogeneous exotic food in Indonesia.
Many thanks to Microsoft, especially Microsoft Research, and Don Syme for developing F#, a functional programming that meets OOP nicely and truly pragmatic! I would like to give special thanks to Packt for giving me the chance to write this wonderful book and Nikhil for his continuous support and always giving me constructive feedback. I also would like to give a big huge thanks for my lovely wife, Dini Kusumawardhono, for always giving me unconditional love and support during the writing of this book and also her continuous understanding every day. I would like to dedicate this book to software development communities in Indonesia, and to all of the F# developer communities around the world. F# rocks!

About the Reviewer

Arthur Pham has been working for Thomson Reuters as a Lead Quantitative Engineer since 2006.
He has spent many years designing and implementing derivatives pricing models and still loves learning new programming languages, such as F#, C++, Python, Flex/ActionScript, C#, Ruby, and JavaScript.
He currently lives in New York, NY, USA and can be contacted on Twitter at @arthurpham.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
www.PacktPub.com
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

Why subscribe?

  • Fully searchable across every book published by Packt
  • Copy and paste, print, and bookmark content
  • On demand and accessible via a web browser

Customer Feedback

Thank you for purchasing this Packt book. We take our commitment to improving our content and products to meet your needs seriously—that's why your feedback is so valuable. Whatever your feelings about your purchase, please consider leaving a review on this book's Amazon page. Not only will this help us, more importantly it will also help others in the community to make an informed decision about the resources that they invest in to learn. You can also review for us on a regular basis by joining our reviewers' club. If you're interested in joining, or would like to learn more about the benefits we offer, please contact us: [email protected].

Preface

It’s well-known today that F# has been quite a first class citizen, a built-in part of programming language support in Visual Studio from Visual Studio 2010. F# is a programming language that has its own unique trait: it is a functional programming language, and at the same time, it has OOP support. F# has run on .NET until now, although we can also run F# as a cross-platform language, such as on Android (using Mono).
Although F# mostly runs faster than C# or VB when doing computations, F# has its own unique performance characteristics. Some of the performance characteristics might not be so obviously identified and code implementations might have implicit bad practices and subtleties that may lead to performance bottlenecks. The bottlenecks may or may not be faster than C#/VB counterparts, although some of the bottlenecks may share the same performance characteristics, such as the use of .NET APIs.
The main goal of this book is to identify the performance problems in F#, measuring and optimizing F# code to run more efficiently, while also maintaining the functional programming style as appropriately as possible.
This book focuses on optimizing F#. A basic skill of F# knowledge (including functional programming concept and basic OOP) is a prerequisite to start understanding its performance problems and optimizing F#.

What this book covers

Chapter 1, Performing Common Optimizations in F#, introduces F# and gives an overview of the common problems in F# code.
Chapter 2, Performance Measurement, helps you get to know what and how to measure and the tooling ecosystem to measure performance.
Chapter 3, Optimizing Data Structures, helps you decide the best and the most optimal use of F#-specific data structures and optimize them.
Chapter 4, Introduction to Concurrency in F#, provides a general introduction to the concept of concurrency and concurrency implementation support in F#.
Chapter 5, Advanced Concurrency Support in F#, provides best practices in implementing advanced concurrency support in F#, including interop with .NET TPL and avoiding performance pitfalls.
Chapter 6, Optimizing Type Provider, gives a quick walk-through of type provider implementation, while at the same time providing optimization and avoiding performance pitfalls in implementing your own custom type providers.
Chapter 7, Language Features and Constructs Optimization, explains best practices when implementing and using various F# language features and constructs without sacrificing the performance and correctness in functional programming.
Chapter 8, Optimizing Computation Expressions, explains ...

Índice