5 ms·
I believe that fibers are considered more trouble than they worth? [0] [0] https://devblogs.microsoft.com/oldnewthing/20191011-00/?p=102989 https://devblogs.mi
by diffuse_l 3y ago
I believe that fibers are considered more trouble than they worth? [0]
[0] https://devblogs.microsoft.com/oldnewthing/20191011-00/?p=102989 https://devblogs.microsoft.com/oldnewthing/20191011-00/?p=10...
- csb6 3y agoThe Gor Nishanov paper linked in that piece goes into a lot of detail of some of the downsides of fibers in an unmanaged language like C++. [0] http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p1364r0.pdf http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p136...
- teleforce 3y agoThanks for the link to the Gor's paper. Apparently the 2018 paper table only covered top 10 languages in the TIOBE index, I wished it can be updated and extended further to top 50 languages. Another popular compiled language with GC (by default) namely D language (TIOBE ranked 37 as of Sept 2023) does support fiber and it's implemented in its vibe.d web framework [1],[2]. Gor also mentioned about significant 160 ns overhead for stackful fiber in Go (goroutine) to interact with a C library i.e. cost of switching between Go's goroutines and C threads (as of 2018). It will be interesting to know the fiber overhead in D language since C compilation is now natively supported by D compiler [3]. [1] Fibers in Programming in D: https://ddili.org/ders/d.en/fibers.html https://ddili.org/ders/d.en/fibers.html [2] Fibers, what for: https://forum.dlang.org/thread/eowfajvnzqnncmfnjhnf@forum.dlang.org https://forum.dlang.org/thread/eowfajvnzqnncmfnjhnf@forum.dl... [3] Adding ANSI C11 C compiler to D so it can import and compile C files directly: https://news.ycombinator.com/item?id=27102584 https://news.ycombinator.com/item?id=27102584