Skip to content

Commit 42d990d

Browse files
committed
spell check galor
1 parent 6adf2d6 commit 42d990d

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/FastExpressionCompiler/ImTools.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ internal static ref T ThrowIndexOutOfBounds<T>(int index, int capacity) =>
219219
throw new IndexOutOfRangeException($"Index {index} is out of range for Stack{capacity}<{typeof(T)},..>.");
220220
}
221221

222-
/// <summary>Stack with the Size information to check the Capacity in the compile time</summary>
222+
/// <summary>Stack with the Size information to check it at compile time</summary>
223223
public interface IStack<T, TSize, TStack> : IStack<T, TStack>
224224
where TSize : struct, ISize
225225
where TStack : struct, IStack<T, TSize, TStack>
@@ -269,25 +269,25 @@ public interface ISize16Plus : ISize8Plus { }
269269
/// <summary>Marker for collection or container holding 4 items</summary>
270270
public struct Size2 : ISize2Plus
271271
{
272-
/// <summary>Returns the size of the collection or container</summary>
272+
/// <inheritdoc/>
273273
public int Size => 2;
274274
}
275275
/// <summary>Marker for collection or container holding 4 items</summary>
276276
public struct Size4 : ISize4Plus
277277
{
278-
/// <summary>Returns the size of the collection or container</summary>
278+
/// <inheritdoc/>
279279
public int Size => 4;
280280
}
281281
/// <summary>Marker for collection or container holding 8 items</summary>
282282
public struct Size8 : ISize8Plus
283283
{
284-
/// <summary>Returns the size of the collection or container</summary>
284+
/// <inheritdoc/>
285285
public int Size => 8;
286286
}
287287
/// <summary>Marker for collection or container holding 16 items</summary>
288288
public struct Size16 : ISize16Plus
289289
{
290-
/// <summary>Returns the size of the collection or container</summary>
290+
/// <inheritdoc/>
291291
public int Size => 16;
292292
}
293293

@@ -819,7 +819,7 @@ public int GetHashCode((A, B, C) key) =>
819819
Hasher.Combine(RuntimeHelpers.GetHashCode(key.Item1), Hasher.Combine(RuntimeHelpers.GetHashCode(key.Item2), RuntimeHelpers.GetHashCode(key.Item3)));
820820
}
821821

822-
/// <summary>Add the Infer parameter to `T Method{T}(..., Use{T} _)` to enable type inference for T,
822+
/// <summary>Add the Use parameter to `T Method{T}(..., Use{T} _)` to enable type inference for T,
823823
/// by calling it as `var t = Method(..., default(Use{T}))`</summary>
824824
public interface Use<T> { }
825825

@@ -836,7 +836,7 @@ public static class SmallMap
836836
internal const byte ProbeCountShift = 32 - ProbeBits;
837837
// ~0b11111000000000000000000000000000 -> 0b00000111111111111111111111111111
838838
internal const int HashAndIndexMask = ~(NotShiftedProbeCountMask << ProbeCountShift);
839-
// Window with the hash mask wothout the lead ProbeMask and closing IndexMask 0b00000111111111111111111111110000
839+
// Window with the hash mask without the lead ProbeMask and closing IndexMask 0b00000111111111111111111111110000
840840
internal const int HashMask = HashAndIndexMask & ~IndexMask;
841841

842842
/// <summary>Represent a keyed entry stored in the SmallMap.
@@ -1388,7 +1388,7 @@ public ref TEntry AddOrGetEntryRef(K key, out bool found)
13881388
// to the usual HashMap packed hashes and indexes array for the promised O(1) lookup.
13891389
// But the values are remaining on the Stack, and for the found index of the entry we use the GetSurePresentItemRef(index)
13901390
// to get the value reference either from the Stack or the Entries.
1391-
// So the values on the stack are guarntied to be stable from the beginning of the map creation,
1391+
// So the values on the stack are guarantied to be stable from the beginning of the map creation,
13921392
// because they are not copied when the Entries need to Resize (depending on the TEntries implementation).
13931393

13941394
_capacityBitShift = MinHashesCapacityBitShift;
@@ -1400,7 +1400,7 @@ public ref TEntry AddOrGetEntryRef(K key, out bool found)
14001400
AddJustHashAndEntryIndexWithoutResizing(default(TEq).GetHashCode(key), StackEntries.Capacity);
14011401

14021402
_count = StackEntries.Capacity + 1; // +1 because we added the new key
1403-
_entries.Init(StackEntries.Capacity); // Give the heap entries the same initial capcity as Stack, effectively doubling the capacity
1403+
_entries.Init(StackEntries.Capacity); // Give the heap entries the same initial capacity as Stack, effectively doubling the capacity
14041404
return ref _entries.AddKeyAndGetEntryRef(key, 0); // add the new key to the entries with the 0 index in the entries
14051405
}
14061406

@@ -1480,7 +1480,7 @@ public ref TEntry AddSureAbsentDefaultEntryAndGetRef(K key)
14801480
AddJustHashAndEntryIndexWithoutResizing(default(TEq).GetHashCode(key), StackEntries.Capacity);
14811481

14821482
_count = StackEntries.Capacity + 1; // +1 because we added the new key
1483-
_entries.Init(StackEntries.Capacity); // Give the heap entries the same initial capcity as Stack, effectively doubling the capacity
1483+
_entries.Init(StackEntries.Capacity); // Give the heap entries the same initial capacity as Stack, effectively doubling the capacity
14841484
return ref _entries.AddKeyAndGetEntryRef(key, 0); // add the new key to the entries with the 0 index in the entries
14851485
}
14861486

test/FastExpressionCompiler.Benchmarks/ArrayCopy_vs_ArrayResize_vs_ForLoop.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public Type[] ArrayResize()
9393
public class SmallList_Switch_vs_AsSpan_ByRef_Access
9494
{
9595
/*
96-
## Baseline: hmm, why AsSpan is faster even if it is utilized only by half of the acces, the other part hits the heap?
96+
## Baseline: hmm, why AsSpan is faster even if it is utilized only by half of the access, the other part hits the heap?
9797
9898
BenchmarkDotNet v0.15.0, Windows 11 (10.0.26100.4061/24H2/2024Update/HudsonValley)
9999
Intel Core i9-8950HK CPU 2.90GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores

0 commit comments

Comments
 (0)