Open in app

Sign In

Write

Sign In

Antão Almada
Antão Almada

710 Followers

Home

Lists

About

Sep 15

Building Custom Iterators with ‘yield’ in C#

An enumerator represents a pull stream. Clients have to call the method MoveNext() to request the next item. If it returns true, it means that it successfully retrieved it and the value will be provided by the Current property. The enumerator is implemented as a state machine. The state is…

Dotnet

6 min read

Building Custom Iterators with ‘yield’ in C#
Building Custom Iterators with ‘yield’ in C#
Dotnet

6 min read


Aug 29

LINQ Internals: Speed Optimizations

Behind the elegant facade of LINQ lies a meticulously engineered core designed for more than just simplicity. This article delves into the technical intricacies of LINQ, focusing on the “speed optimizations” that enhance its execution efficiency. These optimizations also have many shortcomings. LINQ LINQ is short for “Language Integrated Query”. It’s…

Linq

8 min read

LINQ Internals: Speed Optimizations
LINQ Internals: Speed Optimizations
Linq

8 min read


Aug 29

Efficient Data Processing: Leveraging C#’s foreach Loop

EDIT: Added “Return items by reference” section In the dynamic landscape of modern software development, efficient data processing lies at the core of creating high-performance applications. As developers, we constantly strive to balance readability, maintainability, and speed when writing code. In the realm of C#, a programming language known for…

Dotnet

9 min read

Efficient Data Processing: Leveraging C#’s foreach Loop
Efficient Data Processing: Leveraging C#’s foreach Loop
Dotnet

9 min read


Jul 31

ImmutableArray<T> iteration performance in C#

Introduction ImmutableArray<T> is one of the collections provided in the System.Collections.Immutable namespace. All collections in this namespace are immutable, meaning that they cannot be altered once created. These collections do provide mutation methods like Add(), AddRange(), Remove(), RemoveAll(), and so on. …

Dotnet

7 min read

ImmutableArray<T> iteration performance in C#
ImmutableArray<T> iteration performance in C#
Dotnet

7 min read


Jul 20

“A 12 % improvement, easily obtained, is never considered marginal” — Donald Knuth

I’ve been writing articles about performance in .NET for several years but I frequently find in the comments the famous quote from the paper “Structured Programming with go to Statements” by Donald Knuth: We should forget about small efficiencies, say about 97% of the time: premature optimization is the root…

Performance

3 min read

Performance

3 min read


Jul 7

Single Instruction, Multiple Data (SIMD) in .NET

What is SIMD? SIMD stands for “Single Instruction, Multiple Data”. It is a type of parallel processing technique that allows a single instruction to be executed on multiple data elements simultaneously. SIMD enables efficient and high-performance execution of repetitive operations on large sets of data, such as vector and matrix computations. In SIMD…

8 min read

Single Instruction, Multiple Data (SIMD) in .NET
Single Instruction, Multiple Data (SIMD) in .NET

8 min read


Jun 10

Generic math in .NET

Before .NET 7 Some .NET languages like C# support the definition of arithmetic operators. These can be used to write math expressions using the familiar arithmetic operators (+, -, *, /) instead of calling methods (Add, Subtract, Multiply, Divide). For math operations that are not expressed as operators, like trigonometric operations, .NET provides…

Development

3 min read

Generic math in .NET
Generic math in .NET
Development

3 min read


Dec 7, 2022

Using “React Query” to mutate smart contracts (part 2)

NOTE: This series of articles use TypeChain to make strongly-typed calls to Ethereum. Please check its documentation and discussion board to learn how to set it up. It’s also assumed some knowledge of React Query. In my previous post I created a custom hook that wraps the following code: …

Web3

2 min read

Using “React Query” to mutate smart contracts (part 2)
Using “React Query” to mutate smart contracts (part 2)
Web3

2 min read


Dec 7, 2022

Using “React Query” to mutate smart contracts (part 1)

In previous posts I explained how React Query can be used to query smart contracts, that is, to perform read calls. Now I’m going to explain how to mutate, that is, to execute transactions on the blockchain. Unlike read calls, execution of transactions requires the confirmation by the user on…

Web3

2 min read

Using “React Query” to mutate smart contracts (part 1)
Using “React Query” to mutate smart contracts (part 1)
Web3

2 min read


Dec 6, 2022

Using “React Query” to query smart contracts (part 3)

Wallets that support multiple accounts and multiple blockchains, like MetaMask, make it very easy for a user to change active account and active blockchain. A web3 frontend should react immediately to these changes. NOTE: This series of articles use TypeChain to make strongly-typed calls to Ethereum. Please check its documentation…

Web3

2 min read

Using “React Query” to query smart contracts (part 3)
Using “React Query” to query smart contracts (part 3)
Web3

2 min read

Antão Almada

Antão Almada

710 Followers

Principal Engineer @ Farfetch - R&D https://github.com/aalmada

Following
  • Christophe Nasarre

    Christophe Nasarre

  • Jason Yip

    Jason Yip

  • Thomas Rouch

    Thomas Rouch

  • Thomas Jay Rush

    Thomas Jay Rush

  • Yoshifumi Kawai

    Yoshifumi Kawai

See all (216)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams