Skip to content

What's the meaning of magic numbers? #11

Description

@flei2019

Hi, thanks for your great work to calculate Tokens/s. I read your code of App.js and found some magic numbers. Can you please add comments for them? Just list out some numbers as below. It is awesome you would add comments for all magic numbers.

  1.     let finalPromptTime =
         theoryTimePrompt_in_ms * getFloatRatio_F16(quantType) * 1.8 +  // What's the meaning of ”1.8“?
         convertByteToMB(2 * memoryTransfer) * (0.008 / 100);           // What's the meaning of "0.008 / 100" ?
    
  2. What's the meaning of extraFactor 2.0,1.5,1.0 ...?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions