NFAs are cheaper to construct, but have a O(n*m) matching time, where n is the size of the input and m is the size of the state graph. NFAs are often seen as the reasonable middle ground, but i disagree and will argue that NFAs are worse than the other two. they are theoretically “linear”, but in practice they do not perform as well as DFAs (in the average case they are also much slower than backtracking). they spend the complexity in the wrong place - why would i want matching to be slow?! that’s where most of the time is spent. the problem is that m can be arbitrarily large, and putting a large constant of let’s say 1000 on top of n will make matching 1000x slower. just not acceptable for real workloads, the benchmarks speak for themselves here.
度过了早期“撒币式”的资本红利,当前的“百模混战”已进入淘汰赛,赛道新星澜码科技甚至被爆出欠薪800万元,创始人不得不“卖房发薪”。
。业内人士推荐旺商聊官方下载作为进阶阅读
Add us as a preferred source on Google
Do you have an opinion on the issues raised in this article? If you would like to submit a response of up to 300 words by email to be considered for publication in our letters section, please click here.