Re: [Development] How qAsConst and qExchange lead to qNN

2022-11-16 Thread Ulf Hermann via Development
That's a deep copy. A deep copy of a string is obviously more expensive than the overhead of calling the QString ctor and dtor. That remains to be proven. A rule of thumb for atomics is that they're two orders of magnitude slower than a normal int. They also still act as optimizer firewalls. Wit

Re: [Development] How qAsConst and qExchange lead to qNN

2022-11-16 Thread Ulf Hermann via Development
The above isn't thread-safe, it isn't even re-entrant, in the same way that iteration using iterators isn't. This is a known issue whenever you hand out references, and it's nothing that violates our const-is-thread-safe promise, otherwise ... which is why we prefer to hand out (implicitly share

Re: [Development] How qAsConst and qExchange lead to qNN

2022-11-16 Thread Marc Mutz via Development
Hi Philippe, On 15.11.22 12:50, Philippe wrote: > On Tue, 15 Nov 2022 08:52:24 + > Marc Mutz via Development wrote: >> QAnyStringView, QUtf8StringView and, later, QAnyString, QUtf8String, >> can be used to to make UTF-8 a first-class citizen in Qt. > > Maybe, but I see a deviation from simpl

[Development] [Announce] Qt Design Studio 3.8.0 released

2022-11-16 Thread List for announcements regarding Qt releases and development via Announce via Development
We released Qt Design Studio 3.8.0 today, see https://www.qt.io/blog/qt-design-studio-3.8-released Big thanks to everyone involved! Best Regards, Thomas Hartmann ___ Announce mailing list annou...@qt-project.org https://lists.qt-project.org/listinfo/an

Re: [Development] How qAsConst and qExchange lead to qNN

2022-11-16 Thread Volker Hilsheimer via Development
> On 16 Nov 2022, at 09:54, Marc Mutz via Development > wrote: […] >>> But UTF-16 is sacrosanct in Qt. It's a cult. Irregardless of how many >>> deep copies it takes to convert to and from UTF-16 from native >>> encodings, people still worship it as god-given. It's not. […] > If CoW is s

[Development] User Experiment: Risk Assessment in Code Review

2022-11-16 Thread x224yu
Hello there QT developers, My name is Eve and I'm a master’s student working with Prof. Shane McIntosh and Prof. Mike Godfrey at the University of Waterloo. We're conducting a research study on the effectiveness of risk assessment during code review. Specifically, we're studying whether risk

Re: [Development] How qAsConst and qExchange lead to qNN

2022-11-16 Thread Thiago Macieira
On Tuesday, 15 November 2022 23:50:38 PST Marc Mutz via Development wrote: > > in a thread-safe manner (such that if something in > > the same thread or another thread-safely modifies that map, the original > > user isn't affected). > > The above isn't thread-safe, it isn't even re-entrant, in the

Re: [Development] How qAsConst and qExchange lead to qNN

2022-11-16 Thread Thiago Macieira
On Tuesday, 15 November 2022 23:28:46 PST Marc Mutz via Development wrote: > In the problematic case where a temporary container is created at the > call site for the sole purpose of providing function arguments, it's > specifically the dec, though, which is problematic (deref-to-zero has an > acqu

Re: [Development] How qAsConst and qExchange lead to qNN

2022-11-16 Thread Marc Mutz via Development
Hi Volker, On 14.11.22 19:00, Volker Hilsheimer wrote: [...] > Today, the vast majority of client code already has an owning container that > gets passed around by copy or as const references. There are important subsets that don't, e.g. the aforementioned serialisation APIs and where 10%+ exec