Flash (DC Extended Universe) vs Optimus Prime (IDW 2005): who would win?

Flash (DC Extended Universe) favored — Slight edge (~55%)

Flash (DC Extended Universe) · DC · Base

Tier
HIGH 5-A, up to 2-C
Attack Potency
Brown Dwarf Level, up to Low Multiverse Level
Speed
Relativistic+, up to Ftl
Durability
Brown Dwarf Level, up to Small Star Level

Optimus Prime (IDW 2005) · Transformers · Base

Tier
HIGH 5-A, up to 1-A
Attack Potency
Brown Dwarf Level, up to Outerverse Level
Speed
Supersonic, up to Immeasurable
Durability
Brown Dwarf Level

A heuristic estimate from normalized VS Battles Wiki stats: tier, attack potency, speed and durability.