Logo Francesco Montelli
  • Home
  • About
  • Tecnologie
  • Esperienze
  • Istruzione
  • Di più
    Progetti Pubblicazioni Recent Posts
  • Articoli
  • Appunti
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • Tags
  • Agent-Driven Development
  • Allocazioni
  • Architettura
  • Autenticazione
  • Automazione
  • BenchmarkDotNet
  • CAPI
  • CI/CD
  • Cluster API
  • Compliance
  • Composables
  • Containerizzazione
  • Controller
  • CRD
  • CSharp
  • Day 1 Operations
  • DevOps
  • Docker
  • DotNet
  • E2E
  • Event Streaming
  • Frontend
  • GitHub Actions
  • Go
  • Grafana
  • Homelab
  • Image Builder
  • Infrastructure as Code
  • Ingress
  • Instrumentation
  • JavaScript
  • Kafka
  • Keycloak
  • Kind
  • Kubernetes
  • LGTM Stack
  • LINQ
  • Linux
  • Logging
  • Loki
  • Metrics
  • Mimir
  • Monitoring
  • N8n
  • NGINX
  • Node.js
  • Nuxt
  • OAuth2
  • Observability
  • OpenID Connect
  • OpenLayers
  • OpenTelemetry
  • Operator
  • Performance
  • Performance Testing
  • Pinia
  • Pino
  • Playwright
  • Production
  • Prometheus
  • Proxmox
  • Python
  • Routing
  • Security
  • Self-Hosted
  • Sharding
  • Sistemi Distribuiti
  • SRE
  • Sviluppo Locale
  • Telemetry
  • Tempo
  • Testing
  • Tracing
  • TypeScript
  • Ubuntu
  • VisualTesting
  • Vue
  • Vuetify
Hero Image
Quanto Costa Davvero LINQ? Benchmark su .NET 8 con i Numeri

In ogni code review C# prima o poi qualcuno dice “qui LINQ è troppo lento, usa un for”. Ma nessuno tira fuori un benchmark. Oggi lo facciamo – su .NET 8, con BenchmarkDotNet, e con i pattern reali dell’articolo precedente. Nel primo articolo della serie abbiamo visto quattro pattern LINQ trovati in un dispatcher per flotta commerciale. Le fix erano semplici – ToHashSet, GroupBy, ToLookup, foreach. Ma quanto cambia in pratica? Dire “passa da O(n^2) a O(n)” è corretto sul piano teorico. Sul piano pratico, la domanda del tech lead è un’altra: “Quanti microsecondi risparmiamo? Quanta memoria in meno? Vale la pena del refactoring?”. Oggi mettiamo i numeri.

  • LINQ
  • CSharp
  • DotNet
  • Performance
  • BenchmarkDotNet
  • Allocazioni
12 minuti Leggi
Navigazione
  • About
  • Tecnologie
  • Esperienze
  • Istruzione
  • Progetti
  • Pubblicazioni
  • Recent Posts
Contattami:
  • francesco@montelli.dev
  • monte97
  • Francesco Montelli

Avviso di responsabilità: Privacy Policy.


Toha Theme Logo Toha
Francesco Montelli
P.IVA: 02726990399
Creato con Hugo Logo