Apply suggestions from code review

Address gdkchan's feedback

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
This commit is contained in:
FICTURE7 2021-04-13 10:41:41 +04:00 committed by FICTURE7
parent 68bff558db
commit f443167da8
4 changed files with 33 additions and 16 deletions

View file

@ -22,6 +22,8 @@ namespace ARMeilleure.Translation
{
public class Translator
{
private const int CountTableCapacity = 4 * 1024 * 1024;
private long _nextUpdate;
private long _requestAdded;
private long _requestRemoved;
@ -61,7 +63,7 @@ namespace ARMeilleure.Translation
_backgroundTranslatorEvent = new AutoResetEvent(false);
_backgroundTranslatorLock = new ReaderWriterLock();
CountTable = new EntryTable<uint>(capacity: 4 * 1024 * 1024);
CountTable = new EntryTable<uint>(CountTableCapacity);
JitCache.Initialize(allocator);