[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
▼ Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1796134840979.jpg (126 KB, 1280x1111)
126 KB JPG
>launching python to do regexp is faster than std::regex
Bjarnebros... Not like this...
>>
I would like to ask whether this build of python was PGO'd and whether python was also compiled -O2.
>>
>>110486911
just don't use regex.
If you think you got a use-case for them, then you are most likely wrong. It can be done simpler.
>>
>>110486911
What about libraries outside of std?
>>
>>110486911
std::regex is basically deprecated, this is irrelevant, use a library.
>>
>>110486911
It's a retard-tier implementation that was handicapped by supporting both the standard and ABI backwards-compatibility since C++11.

Templates were new and shiny back then, so the ABI supports arbitrary "character" types-- char, wchar, MyImaginaryChar_t (399bit because fuck you), etc.

While it could be redone with C++23 and later improvements, it's a pain in the ass where implementation would be tedious and getting approval of the standards committee would be even worse.
As such, it's basically just for prototyping (similar to the default unordered_map imo). Use ctre/re2/etc. for anything you actually plan on releasing
>>
>>110487101
it doesn't matter, std::regex is absolutely fucked
you can drop in boost::regex and change no other code for a 50x speedup



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.