hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Other
5.23k stars 224 forks source link

[SUGGESTION] Option to disable UFCS #1098

Closed MaxSagebaum closed 3 weeks ago

MaxSagebaum commented 3 weeks ago

As shown in the comment https://github.com/hsutter/cppfront/pull/904#issuecomment-2150622367 UFCS macro/template can have a real impact on compile times. Also, it improved with the later patches, the error messages a some times quite problematic.

name compile compile adjusted compile relative
base_03_cpp2_struct-compile 14.14 0 0
cleanup_00_base-compile 25.48 11.35 1
cleanup_01_remove_UFCS-compile 19.49 5.36 0.47

Therefore I would like to start a discussion about options to disable UFCS for some code parts and maybe for other safety features as well.

What are your thoughts?

zaucy commented 3 weeks ago

possibly duplicate of #1004

MaxSagebaum commented 3 weeks ago

Yes, sorry forgot to search.