We will assume 5 star artifacts. Each artifact has 4 different substats. These are usually drawn randomly (some may initially start with 2 or 3 substats but by level 20 will have 4). We assume each artifact starts with 4 substats at level 0.
When leveling an artifact every 4 levels, one of these substats (chosen randomly) will increase. The increase amount depends on what tier that substat was drawn in. Each substat can be drawn from 4 tiers, each tier giving different amounts of that substat. Here we will assume each substat is drawn from the highest tier.
Substats include hp, atk, def, hp%, atk%, def%, ER, EM, CR, CD (10 different substats). Of these usually CR and CD are most valuable for increasing dps. The crit value is defined as \(CV = 2*CR + CD\). This is defined as usually CR and CD are distributed in a 1:2 ratio within the game.
So as far as optimization goes, given that the search space is small and finite, brute force can be used to find the optimal combination of substats to maximize damage. There are 10 different substats so \(\binom{10}{4} = 210\) different substat combinations on a main piece. There are then \(\binom{8}{3} = 56\) ways the substats can be increased when leveling to level 20. In all there are \(210*56=11760\) possible lv20 artifacts (assuming they start with 4 substats at max tier at lv0). Brute force on 10k possibilities is nothing for modern computers. It can even be done in a second.
But usually one tries to maximize the amount of crit on the substats. For the flower, feather, sands, goblet, each will have 2 substats that max out crit. Each will have 2 other substats which can be atk, er, em, hp, or def depending on what the unit needs. Then lastly the circlet will usually be crit on the main stat with 1 crit substat (that is maxed out) and 3 other substats. It can be a crit rate or crit damage circlet. If it is a crit dmg circlet, one will usually want to max out crit rate on the substat and vice versa.
For a general ATK scaling character, usually atk, atk% are most important as substats. For characters that focus more on their bursts, ER can also be important. For characters that have special scaling with em, hp, or def, those substats can be important too.
At max tier, cr comes in increments of 3.89%, and cd comes in increments of 7.77%. A single piece can level up a substat up to 5 times. For example, if cr is leveled 3 times and cd 2 times, the piece will have 3*3.89% = 11.67% cr and 2*7.77% = 15.54% cd. Sometimes we say we have 3 substats of cr and 2 substats of cd, where we treat 'substat' as a unit of measure. For four of the pieces, substats can be increased up to 20 times (we have 20 substats). The question is how to distribute those 20 times between cr and cd (how to distribute 20 substats between cr, cd).
This depends on other things like the weapon, the circlet, whether the character ascends with crit, and other sources of crit buffs (like Gorou, Blizzard, etc.).
But in general, the average crit multiplier is 1+rd so you want to maximize the product rd of crit rate r and crit damage d.
In total, one artifact piece starts with 4 substats and can level up 5 times, so it will have a total of 9 substats. For the five pieces, there are a total of 45 substats.
Suppose the character does not have crit on the weapon, does not ascend with crit, or get crit buffs from any external source. That is, suppose their only source of crit is from artifacts. Most characters start with 50% cd and 5% cr. What is the optimal choice of crit on the artifacts?
Suppose each non-circlet piece gives 3.89% cr and 7.77% cd at level 0. We then need to allocate 5*4=20 substats between cr and cd. We also have to choose between cr and cd circlet. A cr circlet gives 31.1% cr and up to 7.77*6=46.62% cd. A cd circlet gives 62.2% cd and up to 3.89*6=23.34% cr.
Suppose we use a cr circlet, so that $$r = 5+3.89*(4+x)+31.1 = 51.66+3.89x$$ and $$d = 50+7.77*(4+y)+46.62 = 127.7+7.77y$$ where $$g = x + y - 20 = 0$$ We want to maximize the product $$f = rd = c + 401.3982 y + 496.753 x + 30.2253 xy$$ This is a constrained optimization problem where x, y take on nonnegative integer values.
Using lagrange multipliers gives $$\partial_x(f + \lambda g) = 496.753 + 30.2253 y + \lambda = 0$$ and $$\partial_y(f + \lambda g) = 401.3982 + 30.2253 x + \lambda = 0$$ Solving gives $$\begin{align} -\lambda &= 496.753 + 30.2253 y = 401.3982 + 30.2253 x \\ 95.3548 &= 30.2253 (x - y) \\ x &= y + 3.1548007795 \end{align}$$
Substituting into the constraint g gives $$2y + 3.1548007795 - 20 = 0$$ or y = 8.42259961025. Then x = 11.57740038975.
The optimal cr and cd are then r = 96.7% and d = 193.14%. In other words, r and d are distributed in a 1 to 2 ratio. This has already been derived in optimization.
The expected crit multiplier is then $$1+rd = 1+.967*1.9314 = 2.8676638$$ It is similar to having 100% cr and 200% cd. This is achievable for every vanilla character without the use of crit weapons, assuming optimal artifacts. Of course, in practice it is very hard to get optimal artifacts (2 crit on each piece at max tier, with all rolls going into crit). The odds are quite low (assuming that the artifact rolls are not rigged manually by the game).
We can do a similar calculation if we choose the cd circlet. But first note that no matter how we allocate x and y, there is an invariant in the system $$cv = 2r + d$$ This is called the crit value. If we allocate 20 substats to cr we get 20*3.89=77.8% cr or 155.6 cv. If we allocate 20 substats to cd we get 20*7.77=155.4% which gives a similar cv (rounding).
For the above example with vanilla characters, the cv is around 2*100+200 = 400 cv (estimate). To be precise it is 2*96.7+193.14 = 386.54 cv. Without artifacts, we have 2*5+50=60 cv. Equipping artifacts can give us 155 + 62.2 + (8+6)*7.77 = 325.98 more cv to the vanilla character's starting 5% cr and 50% cd (2*5+50=60 cv). So long as the cv is the same, the optimal choice of r and d will be the same (exercise: prove this).
In the r-d 2d plane, we can plot a line d=2r describing the optimal ratio of r and d. We can also plot contours of 2r+d = cv where all points on a contour have the same crit value. Where the line d=2r and the contour 2r+d=cv intersect describes the optimal solution.
External sources can give more cv and bring us to higher contours and thereby increase the expected crit multiplier. Rosaria and cryo resonance can give up to 15% cr or 30 more cv. Blizzard strayer can give 40% cr on frozen enemies or 80 cv. Itto's c6 gives 70% cd or 70 cv. Gorou's c6 gives 40% cd or 40 cv. Characters that ascend with cr or cd can get 19.2% cr or 38.4% cd at lv90 or 38.4 cv. Weapons can give 44, 66, or 88 cv (the higher the cv the lower the base atk). And then there are basket cases like Kokomi who get -100% cr (sigh).
How big is the gain from cv increase from other sources? We can do some napkin back-of-the-envolope calculations to get an estimate. Above we said that we can get around 400 cv for vanilla characters (only artifacts). The optimal choice is then around 100% cr and 200% cd for a crit multiplier of 3. Say we gain 100 cv from a combo of the above effects (e.g. blizzard). Then we have 500 cv total. By the 1:2 rule the optimal choice is then 125% cr and 250% cd. But wait, there is no point in getting 125% cr (excess). 100% is enough. So here we have overflow. We see that with vanilla artifacts it is possible to reach near 100% cr without weapons or other external crit buffs. (It is just getting perfect artifacts is almost impossible in practice, so weapons and external sources make achieving this dream more possible.)
So we can re-allocate or re-invest the cv as cd. Turn the surplus 25% cr into 50% more cd. So now we have 100% cr and 300% cd. This gives a crit multiplier of 4. This is an increase of 4/3=1.33 times (or 33%). In fact since artifacts alone can give up to 100% cr, then any external crit sources can be converted into cd.
Above we invested most of the substats into cr and cd. Each artifact piece will have 2-3 leftover substats which can be atk, hp, def, er, em. For a vanilla character who is comfortable getting their burst back on cd, usually atk and atk% are good to have as substats. Only for special or 'exotic' characters with hp, def, er, or em scaling can these other non-atk substats be important too. Or if the character needs more ER for an expensive burst, er can be important in achieving that.
Consider a vanilla character that only wants atk. Four pieces will have 2 substats each to invest in atk and atk%. The circlet will have 3 substats: atk, atk%, and flex. In total there will be 5 substats of atk and 5 substats of atk% and 1 substat flex. At max tier, 1 substat of atk gives 19.45 flat atk, so 5 substats will give 97.25. Also at max tier, 1 substat of atk% gives 5.83%, so 10 substats will give 29.15% atk.
So if a vanilla character has say 300 base atk plus a 600 atk weapon, wears a 46.6% atk sands, gets 29.15% atk and 97.25 flat atk from substats ('perfect' artifacts), then they can reach $$(300+600)*(1.466+.2915)+97.25 = 1679$$ total atk. In practice it is possible to reach higher than this since not all substats will be allocated to crit, and more substats may get rolled into atk. But then one has to consider the optimal balancing of attack and crit (three variables). See optimization for more info.
EM, ER, hp, def
Suppose the character wants hp instead of attack (e.g. Candace). Similar to above, there will be 5 leftover substats of flat HP and 5 leftover substats of HP%. At max tier, 1 substat of hp gives 239 flat hp, so 5 substats give 1195 hp. Also at max tier, 1 substat of hp% gives 4.66% hp, so 5 substats give 23.3% hp.
If a vanilla hp scaling character has say 12000 base hp, wears a 46.6% hp sands, and gets the hp substats above, then they can reach $$12000*(1.466+.233)+1195 = 21583$$ total hp. In practice it is possible to reach more than 20k, even get 30k or more hp. This is because above we only assumed 10 substats are allocated to hp. It is possible that more than 10 substats go to hp. Characters may also get more hp through passives, weapons, artifacts, ascension. Optimizing between hp and crit becomes another multivariable problem to consider.
We know the max amount of crit rate we can get is 100% (anything above 100% cr is useless, unless you have some strange passive converting crit rate into increased multipliers or some other stat). But what is the max amount of crit dmg we can get?
Similar to how hyperbloom damage has an upper limit (supremum) and EM is finite, crit is also finite as artifact substats can give only a finite amount of crit (not infinite). In fact we can compute the max amount of cv an artifact can give (ignoring 2p/4p effects).
As derived above the optimal crit ratio for a vanilla character with artifacts is r=96.7% and d=193.14%. Suppose we can freely exchange all of the crit rate for crit damage. So we convert 96.7-5=91.7% cr into 183.4% cd. Adding this gives d'=d+183.4=376.54% cd. So this is an upper limit on crit damage for a vanilla character (without weapon, ascension, artifact effect, resonance, passives, constellations, support, external buffs, etc.).
Although crit is a limited resource, it can hit diminishing returns like atk and dmg bonus. As such constellations that give more scaling or motion value (Xiao C6, Itto C6, Eula C6) can be more valuable than constellations that just give crit buffs if one is already saturated on crit value. Obviously constellations that ignore defense like Raiden C2 or Yae C6 is another orthogonal way to boost damage that is not reliant on stockpiling crit.
Suppose we add external buffs. Then how much cd can we really get? First of all, 4p blizzard + cryo gives 55% cr but no cd, so such an effect does not really increase max possible cd. We can look at Itto: his C6 gives 70% cd, Gorou can givce 40% cd, his weapon gives 88% cd. All this gives him 198% more cd, so he can easily reach 300% cd on some builds. (Note Itto's 19.4% crit rate ascension is not counted to cd, but we could do a similar exercise to see how much crit value we can get out of characters.)
Other examples: Noctis gets 38.4% cd from ascension, 88% cd from his aeon weapon, 42% cd from C2 for 168.4% more cd from artifacts. Lyney gets 66% cd from weapon, 60% cd from C2 for 126% more cd. Xiaogan gets 38.4% cd from ascension, 36% cr from C2 for E, 135% cd from C6 for E, giving 245.4% more cv (173.4% cd).
So constellations+weapons (whale builds) can give up to 100-200% more crit dmg. If one has 200% cd to start with, that is around a 4/3=1.33 or 5/3=1.67 times increase in damage.
For comparison, most characters will have 46.6% atk, maybe 61.6% dmg bonus (without supports). Ideally a dps would like to have a balanced distribution of high atk, high dmg bonus, and high crit. And passives that self-buff the character's dmg bonus and atk can be helpful in achieving this goal (there are few characters that self-buff crit rate at c0, Nahida being one example).
It is just that in absence of many universal crit buffers, it can be easier to buff atk (with Bennett) or dmg bonus (with Mona, Focalors, Kazuha, etc.) than crit. However, this does not change the fact that constellations that give crit can hit diminishing returns (like for atk or dmg bonus) and that constellations that give more scaling or mv can be more valuable (like Xiao/Itto C6).
Universal crit buffers (harmony): as of 4.4 it seems Rosaria is one of the only characters that can universally buff crit (crit rate) for all characters and abilities. Faruzan, Sara, Gorou can buff cd but only for specific elements. Xianyun can buff cr but for plunges. Shenhe (C2) can buff cd but for cryo. In other words, as of 4.4 Genshin does not really have a Bronya.