Pinboard (jm)
https://pinboard.in/u:jm/public/
recent bookmarks from jmhg64: a 64-bit histogram data structure2022-07-26T11:19:24+00:00
https://dotat.at/@/2022-07-15-histogram.html
jmc c++ histograms storage data-structures via:fanf hg64https://pinboard.in/https://pinboard.in/u:jm/b:22d0c9f27fa1/tolower() in bulk at speed2022-06-28T15:29:01+00:00
https://dotat.at/@/2022-06-27-tolower-swar.html
jmc optimization performance hacks tolower swar simdhttps://pinboard.in/https://pinboard.in/u:jm/b:86b30b730c54/Announcing Lucet: Fastly’s native WebAssembly compiler and runtime2019-03-29T16:01:30+00:00
https://www.fastly.com/blog/announcing-lucet-fastly-native-webassembly-compiler-runtime
jmLucet is designed to take WebAssembly beyond the browser, and build a platform for faster, safer execution on Fastly’s edge cloud. WebAssembly is already supported by many languages including Rust, TypeScript, C, and C++, and many more have WebAssembly support in development. We want to enable our customers to go beyond Fastly VCL and move even more logic to the edge, and use any language they choose. Lucet is the engine behind Terrarium, our experimental platform for edge computation using WebAssembly. Soon, we will make it available on Fastly’s edge cloud as well.
A major design requirement for Lucet was to be able to execute on every single request that Fastly handles. That means creating a WebAssembly instance for each of the tens of thousands of requests per second in a single process, which requires a dramatically lower runtime footprint than possible with a browser JavaScript engine. Lucet can instantiate WebAssembly modules in under 50 microseconds, with just a few kilobytes of memory overhead. By comparison, Chromium’s V8 engine takes about 5 milliseconds, and tens of megabytes of memory overhead, to instantiate JavaScript or WebAssembly programs.
With Lucet, Fastly’s edge cloud can execute tens of thousands of WebAssembly programs simultaneously, in the same process, without compromising security. The Lucet compiler and runtime work together to ensure each WebAssembly program is allowed access to only its own resources. This means that Fastly’s customers will be able to write and run programs in more common, general-purpose languages, without compromising the security and safety we’ve always offered.
]]>lucet cdn edge-computing wasm webassembly fastly rust c c++ typescripthttps://pinboard.in/https://pinboard.in/u:jm/b:4ac9abd4a5ad/The BARR-C:2018 Embedded C Coding Standard2018-08-15T11:44:07+00:00
https://barrgroup.com/Embedded-Systems/Books/Embedded-C-Coding-Standard
jmembedded c coding standards style-guides misra c++https://pinboard.in/https://pinboard.in/u:jm/b:1944b997f6a1/rr: lightweight recording & deterministic debugging2018-03-30T21:19:58+00:00
http://rr-project.org/
jmaspires to be your primary C/C++ debugging tool for Linux, replacing — well, enhancing — gdb. You record a failure once, then debug the recording, deterministically, as many times as you want. The same execution is replayed every time. rr also provides efficient reverse execution under gdb. Set breakpoints and data watchpoints and quickly reverse-execute to where they were hit.
(via Kevin Lyda and b0rk)]]>debug gdb mozilla debugging coding cli c++ chttps://pinboard.in/https://pinboard.in/u:jm/b:934a17c302f6/A Branchless UTF-8 Decoder2017-10-09T10:27:09+00:00
http://nullprogram.com/blog/2017/10/06/
jmThis week I took a crack at writing a branchless UTF-8 decoder: a function that decodes a single UTF-8 code point from a byte stream without any if statements, loops, short-circuit operators, or other sorts of conditional jumps. [...] Why branchless? Because high performance CPUs are pipelined. That is, a single instruction is executed over a series of stages, and many instructions are executed in overlapping time intervals, each at a different stage.
Neat hack (via Tony Finch)]]>algorithms optimization unicode utf8 branchless coding c via:fanfhttps://pinboard.in/https://pinboard.in/u:jm/b:e6a102583433/Hyperscan2017-08-12T08:50:41+00:00
https://01.org/hyperscan
jma high-performance multiple regex matching library. It follows the regular expression syntax of the commonly-used libpcre library, yet functions as a standalone library with its own API written in C. Hyperscan uses hybrid automata techniques to allow simultaneous matching of large numbers (up to tens of thousands) of regular expressions, as well as matching of regular expressions across streams of data. Hyperscan is typically used in a DPI library stack.
Hyperscan began in 2008, and evolved from a commercial closed-source product 2009-2015. First developed at Sensory Networks Incorporated, and later acquired and released as open source software by Intel in October 2015.
Hyperscan is under a 3-clause BSD license. We welcome outside contributors.
This is really impressive -- state of the art in parallel regexp matching has improved quite a lot since I was last looking at it.
(via Tony Finch)]]>via:fanf regexps regular-expressions text matching pattern-matching intel open-source bsd c dpi scanning sensory-networkshttps://pinboard.in/https://pinboard.in/u:jm/b:eb7f772d7923/Undefined Behavior in 20172017-07-06T11:36:55+00:00
https://blog.regehr.org/archives/1520
jmRecently we’ve heard a few people imply that problems stemming from undefined behaviors (UB) in C and C++ are largely solved due to ubiquitous availability of dynamic checking tools such as ASan, UBSan, MSan, and TSan. We are here to state the obvious — that, despite the many excellent advances in tooling over the last few years, UB-related problems are far from solved — and to look at the current situation in detail.
]]>via:marc-brooker c c++ coding testing debugging dynamic-analysis valgrind asan ubsan tsanhttps://pinboard.in/https://pinboard.in/u:jm/b:13303806849e/Cloudflare Reverse Proxies are Dumping Uninitialized Memory2017-02-24T10:41:24+00:00
https://bugs.chromium.org/p/project-zero/issues/detail?id=1139
jminternet security cloudflare caching coding buffer-overflows c data-leak leakshttps://pinboard.in/https://pinboard.in/u:jm/b:0015afa911e7/Ratas - A hierarchical timer wheel2016-08-05T20:25:11+00:00
https://www.snellman.net/blog/archive/2016-07-27-ratas-hierarchical-timer-wheel/
jmtimer-wheels timing-wheels algorithms c linux timers data-structureshttps://pinboard.in/https://pinboard.in/u:jm/b:23d21f124b64/ArnoldC2015-07-16T11:21:32+00:00
http://lhartikk.github.io/ArnoldC/
jmvia:rjwalsh c arnold-schwarzenegger one-liners funny coding silly languageshttps://pinboard.in/https://pinboard.in/u:jm/b:b6b6430bdb95/Brubeck, a statsd-compatible metrics aggregator - GitHub Engineering2015-06-23T13:27:18+00:00
http://githubengineering.com/brubeck/
jmgithub monitoring statsd c rewrites ops metricshttps://pinboard.in/https://pinboard.in/u:jm/b:d824ce3cab14/Explanation of the Jump Consistent Hash algorithm2015-03-16T11:15:08+00:00
https://news.ycombinator.com/item?id=8140385
jmeric-veach consistent-hashing algorithms google adwords renderman pixar history coding c c++https://pinboard.in/https://pinboard.in/u:jm/b:62e37133d699/8 gdb tricks you should know (Ksplice Blog)2015-01-30T22:26:19+00:00
https://blogs.oracle.com/ksplice/entry/8_gdb_tricks_you_should
jmc debugging gdb c++ tips codinghttps://pinboard.in/https://pinboard.in/u:jm/b:af705539a22f/carbon-c-relay2015-01-19T14:18:02+00:00
https://github.com/grobian/carbon-c-relay
jmThe main reason to build a replacement is performance and configurability. Carbon is single threaded, and sending metrics to multiple consistent-hash clusters requires chaining of relays. This project provides a multithreaded relay which can address multiple targets and clusters for each and every metric based on pattern matches.
]]>graphite carbon c python ops metricshttps://pinboard.in/https://pinboard.in/u:jm/b:ee72eb3ccb1a/CLion – Brand New IDE for C and C++ Developers2014-09-09T13:19:56+00:00
http://blog.jetbrains.com/clion/2014/09/05/clion-brand-new-ide-for-c-and-c-developers/
jmc c++ refactoring ide intelli-j clion jetbrains editors codinghttps://pinboard.in/https://pinboard.in/u:jm/b:41a0061b835d/Haywire2014-04-22T11:24:54+00:00
https://github.com/kellabyte/Haywire
jmserver http asynchronous libuv haywire kellabyte c events open-source asl2https://pinboard.in/https://pinboard.in/u:jm/b:621e5570c71d/Toyota's killer firmware: Bad design and its consequences2013-10-30T10:55:21+00:00
http://www.edn.com/design/automotive/4423428/Toyota-s-killer-firmware--Bad-design-and-its-consequences
jm
The Camry electronic throttle control system code was found to have 11,000 global variables. Barr described the code as “spaghetti.” Using the Cyclomatic Complexity metric, 67 functions were rated untestable (meaning they scored more than 50). The throttle angle function scored more than 100 (unmaintainable).
Toyota loosely followed the widely adopted MISRA-C coding rules but Barr’s group found 80,000 rule violations. Toyota's own internal standards make use of only 11 MISRA-C rules, and five of those were violated in the actual code. MISRA-C:1998, in effect when the code was originally written, has 93 required and 34 advisory rules. Toyota nailed six of them. Barr also discovered inadequate and untracked peer code reviews and the absence of any bug-tracking system at Toyota.
On top of this, there was no error-correcting RAM in use; stack-killing recursive code; a quoted 94% stack usage; risks of unintentional RTOS task shutdown; buffer overflows; unsafe casting; race conditions; unchecked error code return values; and a trivial watchdog timer check. Crappy, unsafe coding.]]>firmware horror embedded-systems toyota camry safety acceleration misra-c coding code-verification spaghetti-code cyclomatic-complexity realtime rtos c code-reviews bug-tracking qualityhttps://pinboard.in/https://pinboard.in/u:jm/b:acba21cb4f78/Fastest sort of fixed length 6 int array - Stack Overflow2011-08-25T20:08:24+00:00
http://stackoverflow.com/questions/2786899/fastest-sort-of-fixed-length-6-int-array/
jmsorting-networks c algorithms sorting optimization sort stack-overflowhttps://pinboard.in/https://pinboard.in/u:jm/b:01927f20135c/"Source Code Optimisation", Felix von Leitner, Linux Kongress 2009 [PDF]2009-11-17T15:34:43+00:00
http://www.linux-kongress.org/2009/slides/compiler_survey_felix_von_leitner.pdf
jmvia:iamcal compilers c c++ optimization coding assembly speedhttps://pinboard.in/u:jm/b:691614ec2fbc/codepad.org2009-08-21T12:51:51+00:00
http://codepad.org/about
jmcodepad vm jails infrastructure security via:waxy c languages programming sandbox pastebinhttps://pinboard.in/u:jm/b:5b08a9330bc0/