On 2017-02-15 2:40 AM, Clemens Ladisch wrote:
Cecil Westerhof wrote:
2017-02-15 8:58 GMT+01:00 Clemens Ladisch <clem...@ladisch.de>:
Threading is the most extreme method of achieving parallelism, and
therefore should be used only as the last resort.  (I'd compare it to
assembly code in this regard.)

​At the moment I am not using it much and I am certainly not an expert, but
as I understood it one of the reasons to use threading is that it costs a
lot less resources.

And just like with assembly code, you also have to count the time spent
writing it, and debugging the result.

Also, its a long time since hand-writing assembly code was any good for performance, unless you're a 1% top expert with a good reason.

If you want speed, write in C or something else that isn't assembly. The odds are like 99% that the modern C compiler will generate faster code than you could ever write yourself in assembly, and it will be much less buggy.

Similarly with threads, for the vast majority of people, using other concurrency models with supported languages are better; they will still get the performance benefit of using multiple CPU cores but do it much more safely than if you are explicitly using "threads" in code.

-- Darren Duncan

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to