Open main menu

UESPWiki β

User:Salamangkero/Sandbox

< User:Salamangkero

<small> is faster than {{small}}Edit

<small>Edit

KJAH SDFH KLJH FAKL SDJH FAKL DSHF KJAD SHFL KJAN SDCJ NASO ERUH AUWO IYEF HADS CHNK SNCL KNAS JROR IEWU PIWE HJKF NBDS LKJV NKLA SDNF OHRF OIQP REWF HSAD KJVH AKSJ DNFP OQRE HFOI DSAP AKJS DHFK AJEH NFFA JKWH EFKJ ADSH CALS EKRY LCAM IWYR AMLX KERM HLAK SJDF AJSC NCMN ALSK DJFO QIWE URPO QYET UIRY HTJK DVNM CXZV NSMC FNLS AKFY JTQP OIRE UTPW EOIG SDKJ FVNB ZMCV NAMC SVNA QLKJ FOQI REUT WPOI RGKJ SDFH VNJC XZVN

CPU time usage 0.003 seconds 0.007 seconds 0.005 seconds 0.003 seconds 0.003 seconds
Real time usage 0.005 seconds 0.013 seconds 0.010 seconds 0.006 seconds 0.005 seconds

{{small}}Edit

KJAH SDFH KLJH FAKL SDJH FAKL DSHF KJAD SHFL KJAN SDCJ NASO ERUH AUWO IYEF HADS CHNK SNCL KNAS JROR IEWU PIWE HJKF NBDS LKJV NKLA SDNF OHRF OIQP REWF HSAD KJVH AKSJ DNFP OQRE HFOI DSAP AKJS DHFK AJEH NFFA JKWH EFKJ ADSH CALS EKRY LCAM IWYR AMLX KERM HLAK SJDF AJSC NCMN ALSK DJFO QIWE URPO QYET UIRY HTJK DVNM CXZV NSMC FNLS AKFY JTQP OIRE UTPW EOIG SDKJ FVNB ZMCV NAMC SVNA QLKJ FOQI REUT WPOI RGKJ SDFH VNJC XZVN

CPU time usage 0.014 seconds 0.016 seconds 0.014 seconds 0.022 seconds 0.015 seconds
Real time usage 0.021 seconds 0.022 seconds 0.021 seconds 0.029 seconds 0.021 seconds

ConclusionEdit

The experiment above used <small> and transcluded {{small}} only 83 times.

  • Using <small>, there was no need to transclude any template. Furthermore, it also does not result in any additional HTML code being generated.
<small>SMALL TEXT</small>
  • Transcluding the {{small}} template adds a small overhead when rendering, which becomes readily apparent with repeated transclusions. Each transclusion also results in more HTML code.
<span style="font-size: x-small">SMALL TEXT</span>

The difference between both approaches to small text is negligible for web browsers, mobile browsers and the UESP app. For wiki editors, I don't think maintainability and/or readability is negatively or significantly impacted, if at all, by using <small>. Thus, I would strongly recommend (eventually) phasing out the {{small}} template and replacing it with <small>. However, I must admit I have not yet evaluated either approach from an accessibility perspective; for example, will screen readers read small text differently for both cases?

Which one is faster?Edit

{{al}}, transcluded every timeEdit

A B C D E F G H I J K L
KJAH SDFH KLJH FAKL SDJH FAKL DSHF KJAD SHFL KJAN SDCJ NASO
ERUH AUWO IYEF HADS CHNK SNCL KNAS JROR IEWU PIWE HJKF NBDS
LKJV NKLA SDNF OHRF OIQP REWF HSAD KJVH AKSJ DNFP OQRE HFOI
DSAP AKJS DHFK AJEH NFFA JKWH EFKJ ADSH CALS EKRY LCAM IWYR
AMLX KERM HLAK SJDF AJSC NCMN ALSK DJFO QIWE URPO QYET UIRY
HTJK DVNM CXZV NSMC FNLS AKFY JTQP OIRE UTPW EOIG SDKJ FVNB
ZMCV NAMC SVNA QLKJ FOQI REUT WPOI RGKJ SDFH VNJC XZVN KJAH
SDFH KLJH FAKL SDJH FAKL DSHF KJAD SHFL KJAN SDCJ NASO ERUH
AUWO IYEF HADS CHNK SNCL KNAS JROR IEWU PIWE HJKF NBDS LKJV
NKLA SDNF OHRF OIQP REWF HSAD KJVH AKSJ DNFP OQRE HFOI DSAP
AKJS DHFK AJEH NFFA JKWH EFKJ ADSH CALS EKRY LCAM IWYR AMLX
KERM HLAK SJDF AJSC NCMN ALSK DJFO QIWE URPO QYET UIRY HTJK
DVNM CXZV NSMC FNLS AKFY JTQP OIRE UTPW EOIG SDKJ FVNB ZMCV
NAMC SVNA QLKJ FOQI REUT WPOI RGKJ SDFH VNJC XZVN
CPU time usage 0.053 seconds 0.032 seconds 0.032 seconds 0.055 seconds 0.032 seconds
Real time usage 0.062 seconds 0.040 seconds 0.039 seconds 0.063 seconds 0.039 seconds

{{al}}, assigned to a variableEdit

A B C D E F G H I J K L
KJAH SDFH KLJH FAKL SDJH FAKL DSHF KJAD SHFL KJAN SDCJ NASO
ERUH AUWO IYEF HADS CHNK SNCL KNAS JROR IEWU PIWE HJKF NBDS
LKJV NKLA SDNF OHRF OIQP REWF HSAD KJVH AKSJ DNFP OQRE HFOI
DSAP AKJS DHFK AJEH NFFA JKWH EFKJ ADSH CALS EKRY LCAM IWYR
AMLX KERM HLAK SJDF AJSC NCMN ALSK DJFO QIWE URPO QYET UIRY
HTJK DVNM CXZV NSMC FNLS AKFY JTQP OIRE UTPW EOIG SDKJ FVNB
ZMCV NAMC SVNA QLKJ FOQI REUT WPOI RGKJ SDFH VNJC XZVN KJAH
SDFH KLJH FAKL SDJH FAKL DSHF KJAD SHFL KJAN SDCJ NASO ERUH
AUWO IYEF HADS CHNK SNCL KNAS JROR IEWU PIWE HJKF NBDS LKJV
NKLA SDNF OHRF OIQP REWF HSAD KJVH AKSJ DNFP OQRE HFOI DSAP
AKJS DHFK AJEH NFFA JKWH EFKJ ADSH CALS EKRY LCAM IWYR AMLX
KERM HLAK SJDF AJSC NCMN ALSK DJFO QIWE URPO QYET UIRY HTJK
DVNM CXZV NSMC FNLS AKFY JTQP OIRE UTPW EOIG SDKJ FVNB ZMCV
NAMC SVNA QLKJ FOQI REUT WPOI RGKJ SDFH VNJC XZVN
CPU time usage 0.017 seconds 0.011 seconds 0.012 seconds 0.028 seconds 0.011 seconds
Real time usage 0.023 seconds 0.019 seconds 0.019 seconds 0.040 seconds 0.018 seconds

{{subst:al|r}} or style=align:rightEdit

A B C D E F G H I J K L
KJAH SDFH KLJH FAKL SDJH FAKL DSHF KJAD SHFL KJAN SDCJ NASO
ERUH AUWO IYEF HADS CHNK SNCL KNAS JROR IEWU PIWE HJKF NBDS
LKJV NKLA SDNF OHRF OIQP REWF HSAD KJVH AKSJ DNFP OQRE HFOI
DSAP AKJS DHFK AJEH NFFA JKWH EFKJ ADSH CALS EKRY LCAM IWYR
AMLX KERM HLAK SJDF AJSC NCMN ALSK DJFO QIWE URPO QYET UIRY
HTJK DVNM CXZV NSMC FNLS AKFY JTQP OIRE UTPW EOIG SDKJ FVNB
ZMCV NAMC SVNA QLKJ FOQI REUT WPOI RGKJ SDFH VNJC XZVN KJAH
SDFH KLJH FAKL SDJH FAKL DSHF KJAD SHFL KJAN SDCJ NASO ERUH
AUWO IYEF HADS CHNK SNCL KNAS JROR IEWU PIWE HJKF NBDS LKJV
NKLA SDNF OHRF OIQP REWF HSAD KJVH AKSJ DNFP OQRE HFOI DSAP
AKJS DHFK AJEH NFFA JKWH EFKJ ADSH CALS EKRY LCAM IWYR AMLX
KERM HLAK SJDF AJSC NCMN ALSK DJFO QIWE URPO QYET UIRY HTJK
DVNM CXZV NSMC FNLS AKFY JTQP OIRE UTPW EOIG SDKJ FVNB ZMCV
NAMC SVNA QLKJ FOQI REUT WPOI RGKJ SDFH VNJC XZVN
CPU time usage 0.015 seconds 0.011 seconds 0.010 seconds 0.008 seconds 0.017 seconds
Real time usage 0.019 seconds 0.014 seconds 0.013 seconds 0.011 seconds 0.022 seconds

Full namespaces and shortened ones are equally fastEdit

Full namespaceEdit

CPU time usage 0.127 seconds 0.101 seconds 0.094 seconds 0.103 seconds 0.098 seconds
Real time usage 0.206 seconds 0.175 seconds 0.175 seconds 0.186 seconds 0.169 seconds

Shortened namespaceEdit

CPU time usage 0.107 seconds 0.112 seconds 0.129 seconds 0.096 seconds 0.107 seconds
Real time usage 0.185 seconds 0.192 seconds 0.214 seconds 0.175 seconds 0.176 seconds

ConclusionEdit

No significant difference found. I recommend using shortened namespaces but only because it results in shorter (and arguably more readable) wikitext.

Fun with UserboxesEdit

  This user has been on UESPWiki for 12 years, 4 months, and 17 days.
  This user is a WikiGnome.
  This user is knowledgeable about Morrowind.
  This user is knowledgeable about Tribunal.
  This user is knowledgeable about Bloodmoon.
  This user uses cslist.uesp.net
  This user plays on a Windows PC.
  This user is an outlander in Vvardenfell
  This user worships Azura.
  This user worships Vivec.
  This user is a proud member of the LGBT community.
  This user knows much, tells some.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

MW:Enchant FormulaEdit

Old vs. Current Enchant FormulaEdit

Saw this video, tried it on my own calculator (which is based on the current enchant formula in UESP) and got a different calculation. It's bothering me so, for starters, I'm testing the two known formulas against vanilla Morrowind.

Historically, there have been two enchant formulae:

  • The old enchant formula is based on the enchant simulator by user Kertaw48 (or vice-versa)
  • The current enchant formula was written by user Scientific Gamer, as a correction
Summon Ancestral Ghost on Self 1s 2s 3s 4s 5s 6s 7s 8s 9s 10s 11s 12s 13s 14s 15s 16s 17s 18s 19s 20s
Unmodded MW (GOTY) 1 1 1 1 1 2 2 2 3 3 4 4 4 5 5 5 6 6 6 7
Old Enchant Formula 0.35 0.7 1.05 1.4 1.75 2.1 2.45 2.8 3.15 3.5 3.85 4.2 4.55 4.9 5.25 5.6 5.95 6.3 6.65 7
Current Enchant Formula 0.53 0.88 1.23 1.58 1.93 2.28 2.63 2.98 3.33 3.68 4.03 4.38 4.73 5.08 5.43 5.78 6.13 6.48 6.83 7.18

Okay, so for a single enchantment, assuming the total enchant cost is truncated (ie. floored / rounded down), it seems the current enchant formula is correct... so far. In a later section, we'll see how it fares against multiple enchantments, that is, when compounded multipliers come into play.

Min-1 RuleEdit

Enchantments, no matter how cheap, cost a minimum of 1 charge. When is this rule applied?

  • Is it applied to the total enchantment cost?
  • Or is it applied per spell effect? In which case, is it applied before or after the spell effect's cost is compounded?

For this experiment, we're working with the unmodified costs per spell effect, that is, we don't want to factor in the effects of either rounding or truncating. We're using cheap spell effects so everything rounds down and truncates to zero.

MW (GOTY) Total: 5
M Spell Effect Cost Just Compounded Min-1 then Compound Compound then Min-1
1 Detect Animal 1s 1pt on Self 0.06 0.06 1.0 1.0
2 Fortify Fatigue 1s 1pt on Self 0.04 0.08 2.0 1.0
3 Resist Paralysis 1s 1pt on Self 0.02 0.06 3.0 1.0
4 Light 1s 1pt on Self 0.02 0.08 4.0 1.0
5 Night Eye 1s 1pt on Self 0.02 0.10 5.0 1.0
Total 0.38 15.0 5.0

Well, that was fairly straightforward. The per-effect cost is compounded, then set to a minimum of 1, then summed to get the final enchantment cost.

Two Enchantments, Part OneEdit

Unmodded MW
(GOTY)
1st: Summon Ancestral Ghost on Self (x2)
1s 2s 3s 4s 5s 6s 7s 8s 9s 10s
2nd: 1pt Fire Damage on Target (x1)
1s 2 2 2 2 3 4 5 5 6 7
2s 2 2 2 3 3 4 5 5 6 7
3s 2 2 3 3 3 5 5 5 7 7
4s 3 3 3 3 4 5 5 5 7 7
5s 3 3 3 3 4 5 6 6 7 8
6s 3 3 3 4 4 5 6 6 7 8
7s 3 3 4 4 4 6 6 6 8 8
8s 4 4 4 4 5 6 6 7 8 8
9s 4 4 4 4 5 6 7 7 8 9
10s 4 4 4 5 5 6 7 7 8 9
Current Enchant Formula
(truncate, compound, min-1, then sum)
1st: Summon Ancestral Ghost on Self (x2)
1s 2s 3s 4s 5s 6s 7s 8s 9s 10s
2nd: 1pt Fire Damage on Target (x1)
1s 2 2 3 3 3 5 5 5 7 7
2s 2 2 3 3 3 5 5 5 7 7
3s 2 2 3 3 3 5 5 5 7 7
4s 2 2 3 3 3 5 5 5 7 7
5s 2 2 3 3 3 5 5 5 7 7
6s 3 3 4 4 4 6 6 6 8 8
7s 3 3 4 4 4 6 6 6 8 8
8s 4 4 5 5 5 7 7 7 9 9
9s 4 4 5 5 5 7 7 7 9 9
10s 4 4 5 5 5 7 7 7 9 9

Obviously, the outcomes are different. I have some hypotheses:

  • the order of compounding, min-1, summation and truncation are incorrect, and/or
  • the game might be rounding instead of truncating, and/or
  • the game might be rounding / truncating to the nearest 0.1

As already established in the previous section, min-1, happens after compounding. Thus, for the following experiments,

I'm assuming the following order of operations:

  • Calculate cost-per-spell-effect as n
  • α(n)
  • Multiply n by i
  • β(n)
  • Set the minimum of n to 1
  • Get the total of n1…i
  • γ(n)
  • The end result is Cx,y

where:

  • α, β and γ are functions that:
    • does nothing,
    • floors / truncates n, or
    • rounds n to the nearest integer.
  • i is the number of enchantments.
  • Cx,y is the total cost of the following enchantment:
    • Summon Ancestral Ghost for x seconds on Self (first effect)
    • 1pt Fire Damage for y seconds on Target (second effect)

and we're only comparing twenty values:

  • C1,1 to C1,10, and
  • C10,1 to C10,10

because we don't need to generate 100 values for every experiment (yet).

α β γ C1,1…10 C10,1…10
Morrowind (GOTY) 2 2 2 2 3 4 5 5 6 7 4 4 4 5 5 6 7 7 8 9
none none none 2.00 2.40 3.10 3.80 4.50 5.20 5.90 6.60 7.30 8.00 4.75 5.15 5.85 6.55 7.25 7.95 8.65 9.35 10.05 10.75
none none floor 2 2 3 3 4 5 5 6 7 8 4 5 5 6 7 7 8 9 10 10
none none round 2 2 3 4 5 5 6 7 7 8 5 5 6 7 7 8 9 9 10 11
none floor any 2 2 3 3 4 5 5 6 7 8 4 4 5 5 6 7 7 8 9 10
none round any 2 2 3 4 5 5 6 7 7 8 5 5 6 7 8 8 9 10 10 11
floor any any 2 2 3 3 3 5 5 5 7 7 4 4 5 5 5 7 7 7 9 9
round any any 2 3 3 3 5 5 5 7 7 9 5 6 6 6 8 8 8 10 10 12

None of them matched! With the exception of α=floor(n), all other combos result in too high values for Cx,10.

Also, that stretch of 2's in C1,1…4 and that stretch of 4's in C10,1…3 are very challenging to replicate.

Oh well, let's keep trying!

Two Enchantments, Part TwoEdit

α β γ C1,1…10 C10,1…10 Notes
Morrowind (GOTY) 2 2 2 2 3 4 5 5 6 7 4 4 4 5 5 6 7 7 8 9
floor(0.1) none none 2.0 2.4 3.0 3.8 4.4 5.2 5.8 6.6 7.2 8.0 4.7 5.1 5.7 6.5 7.1 7.9 8.5 9.3 9.9 10.7
floor(0.1) none none 2.0 2.0 2.3 3.1 3.7 4.5 5.1 5.9 6.5 7.3 4.3 5.1 5.7 6.5 7.1 7.9 8.5 9.3 9.9 10.7 No min-1 after compounding; instead, min-N after γ(n)
floor(0.1) floor any 2 2 2 2 3 4 4 5 6 7 3 4 5 5 6 7 7 8 9 10
floor(0.1) round any 2 2 2 3 3 4 5 6 6 7 5 5 6 7 7 8 9 10 10 11
floor(0.1) floor(0.1)/round(0.1) none 2.0 2.0 2.3 3.1 3.7 4.5 5.1 5.9 6.5 7.3 4.3 5.1 5.7 6.5 7.1 7.9 8.5 9.3 9.9 10.7
round(0.1) none/floor(0.1)/round(0.1) none 2.0 2.0 2.6 3.2 4.0 4.6 5.4 6.0 6.8 7.4 4.6 5.2 6.0 6.6 7.4 8.0 8.8 9.4 10.2 10.8
round(0.1) floor any 2 2 2 2 3 4 5 5 6 7 3 4 5 5 6 7 8 8 9 10
round(0.1) round any 2 2 2 3 4 4 5 6 6 7 5 5 6 7 8 8 9 10 10 11

Looks like all other combos result in too high values for Cx,10.

While α=floor(n, 0.1) / round(n, 0.1) and β=floor(n) was able to replicate that stretch of 2's in C1,1…4, it failed to produce that stretch of 4's in C10,1…3.

Okay, new idea!

Two Enchantments, Part ThreeEdit

We'll be testing several ideas using the two most promising settings, so far. Neither does min-1 after compounding; instead, min-N after γ(n)/. Both have β = floor(n).

α β γ C1,1…10 C10,1…10 Notes
Morrowind (GOTY) 2 2 2 2 3 4 5 5 6 7 4 4 4 5 5 6 7 7 8 9
floor(0.1) floor none 2 2 2 3 3 4 5 5 6 7 4 4 5 6 6 7 8 8 9 10 I know this video is about spellmaking, but what if area=1 for "on Self" effects?
round(0.1) floor none 2 2 2 3 3 4 5 6 6 7 4 4 5 6 6 7 8 9 9 10
floor(0.1) floor none 2 2 2 3 4 4 5 6 7 7 5 6 6 7 8 8 9 10 11 11 Also related to spellmaking, where duration has a +1 modifier
round(0.1) floor none 2 2 2 3 4 5 5 6 7 7 5 6 6 7 8 9 9 10 11 11

Links to Custom SearchesEdit