/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/ObjectPool/perf/Microbenchmarks/Foo.cs
22 строки
536 B
Martin Taillefer
Reimplement the default object pool for improved performance (#45251)
15 дек 2022, 01:42
Не верифицирован
15 дек 2022, 01:42
53124ab
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; namespace Microsoft.Extensions.ObjectPool.Microbenchmarks; #pragma warning disable S109, CPR138 internal sealed class Foo { public int LastRandom; public void SimulateWork() { // burn some cycles to simulate work being done between get and return for (int i = 0; i <= 32; i++) { LastRandom = Random.Shared.Next(); } } }