Author : Dua Guillaume
Date : 04-26-2020
Requirement : A first experience with CMake
As a modern C++ specialist, my job is to focus on software development, from a performance and quality perspective.
| #include <iostream> | |
| #include <cmath> | |
| // Sample of an optimizer bug in Visual Studio 2003 - 2019 (or more) | |
| // | |
| // Compiling this program in Release (/O1, /O2 or /Ox and LTCG) in both x86 and x64 | |
| // configurations produces a different output from unoptimized (Debug) configurations. | |
| // | |
| // Expected output: 709 | |
| // Produced output: 31 |
| Erfcx[x_] := 2/Sqrt[Pi] HermiteH[-1, x] |
COW, short for copy on write, is a way to implement mutable strings so that creating strings and logically copying strings, is reduced to almost nothing; conceptually they become free operations like no-ops.
Basic idea: to share a data buffer among string instances, and only make a copy for a specific instance (the copy on write) when that instance's data is modified. The general cost of this is only an extra indirection for accessing the value of a string, so a COW implementation is highly desirable. And so the original C++ standard, C++98, and its correction C++03, had special support for COW implementations, and e.g. the g++ compiler's std::string implementations used COW.
So why was that support dropped in C++11?
In particular, would the same reason or reasons apply to a reference counted immutable string value class?
Bulk Download of Recordings and Gallery items
Write a simple script
Edit: This list is now maintained in the rust-anthology repo.
| %%----------------------------------------------------------------------- | |
| %% Make your own quadrille, graph, hex, etc paper! | |
| %% Uses the pgf/TikZ package for LaTeX, which should be part of | |
| %% any modern TeX installation. | |
| %% Email: mcnees@gmail.com | |
| %% Twitter: @mcnees | |
| %%----------------------------------------------------------------------- | |
| \documentclass[11pt]{article} |
| import JSON | |
| ################### | |
| ### Write data #### | |
| ################### | |
| # dictionary to write | |
| dict1 = Dict("param1" => 1, "param2" => 2, | |
| "dict" => Dict("d1"=>1.,"d2"=>1.,"d3"=>1.)) | |
| # pass data as a json string (how it shall be displayed in a file) | |
| stringdata = JSON.json(dict1) |
| py_binary( | |
| name = 'generate_compile_command', | |
| srcs = [ | |
| 'generate_compile_command.py', | |
| ], | |
| deps = [ | |
| '//third_party/bazel:extra_actions_proto_py', | |
| ], | |
| ) |