You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hashEntries is an array, so this is technically possible, and it should benefit by eliminating virtual call to ICollection<T>.Count that is called by Linq.Enumerable.Count() under the hood (in theory it is possible that due to several inlines made by JIT a possibility for guarded devirtualization can occur, but I think it is better to reduce JIT work anyway and just access Length directly).
This is very simple change, so if you are interested in it, I could submit a PR.
The text was updated successfully, but these errors were encountered:
f-i-x-7
added a commit
to f-i-x-7/Orleans.Redis
that referenced
this issue
Jan 11, 2022
There is a possibility for micro perf improvement by replacing this line:
Orleans.Redis/src/Orleans.Persistence.Redis/RedisGrainStorage.cs
Line 124 in 1de3c47
to this:
if (hashEntries.Length == 2)
hashEntries
is an array, so this is technically possible, and it should benefit by eliminating virtual call toICollection<T>.Count
that is called byLinq.Enumerable.Count()
under the hood (in theory it is possible that due to several inlines made by JIT a possibility for guarded devirtualization can occur, but I think it is better to reduce JIT work anyway and just accessLength
directly).This is very simple change, so if you are interested in it, I could submit a PR.
The text was updated successfully, but these errors were encountered: