Remove c

A Faster, Lightweight Trigger Function in C for PostgreSQL

DZone

We have been writing blog posts about how to write simple extensions in C language and a little more complex one by Ibrar which were well received by PostgreSQL user community. We were discussing how simple/lightweight and faster a trigger function is when written in C.

C++ 130

f() vs f(void) in C vs C++

Nick Desaulniers

Prefer f(void) in C to potentially save a 1B instruction per function call when targeting x86_64 as a micro-optimization. Doesn’t matter for C++. While messing around with some C code in godbolt Compiler Explorer , I kept noticing a particular funny case. For example, the following C code: 1. eax being x86_64’s return register for the C ABI should be treated as call clobbered. Unfortunately, in C the answer is no, and C and C++ differ here.

C++ 87

Improving Print Logging With Line Pos Info and Modern C++

DZone

performance c++ logging debugging line pos info print logging variadic templatesNo matter how proficient you are, I think, you might still use one of the primary methods of debugging: trace values using printf , TRACE , outputDebugString , etc… and then scan the output while debugging. Adding information about the line number and the file where the log message comes from is a very efficient method that might save you a lot of time.

C++ 100

Additional C/C++ Tooling

Nick Desaulniers

21st Century C by Ben Klemens. There are a few other useful tools that came to mind that I’ve used when working with C and C++ codebases. C & C++ codebases; running these tools on the code or adding them to the codebases. From my experience working with Emscripten , we recommend the use of CMake for people writing portable C/C++ programs. I think C++ needs a package manager badly , and I think CMake would be a solid foundation for one.

C++ 63

C++ Libraries: Casablanca

Sutter's Mill

At GoingNative in February , I emphasized the need for more modern and portable C++ libraries, including for things like RESTful web/cloud services, HTTP, JSON, and more. Casablanca” aims to make it significantly easier for C++ coders to consume and implement RESTful services.

C++ 73

My C++ and Beyond Intro: C++ Renaissance

Sutter's Mill

Channel 9 has just posted a recording of my intro talk at C++ and Beyond 2011 last month in Banff. Here’s the link: C++ and Beyond 2011: Why C++. NET C++ Java Microsoft Software Development

C++ 52

CheriABI: enforcing valid pointer provenance and minimizing pointer privilege in the POSIX C run-time environment

The Morning Paper

CheriABI: enforcing valid pointer provenance and minimizing pointer privilege in the POSIX C run-time environment Davis et al., And this all has to work for whole-system executions, not just the C-language portion of user processes.

C++ 86

C++ and Beyond 2011

Sutter's Mill

I’m very much looking forward to C++ and Beyond 2011 this August, again with Scott Meyers and Andrei Alexandrescu. This year’s program will be heavily oriented toward performance (first) and C++0x (second). C++ Concurrency Software Development Talks & Events

C++ 52

Your First C Program

Sutter's Mill

As a tribute in honor of Dennis Ritchie’s passing , I’d like to invite you to share your thoughts in this post’s comments about your first C program – either the code if you remember it approximately, or a story about when you wrote it. Here’s the thing: I had never used C.

C++ 52

Garbage Collection Synopsis, and C++

Sutter's Mill

When it is going to land in the C++ world? GC and C++. C++ has always supported #1 well via reference counted smart pointers. Those are now standard in C++11 in the form of unique_ptr, shared_ptr, weak_ptr. NET C++ Software Development

C++ 52

Facebook Folly – OSS C++ Libraries

Sutter's Mill

I’ve been beating the drum this year (see the last section of the talk) that the biggest problem facing C++ today is the lack of a large set of de jure and de facto standard libraries. My team at Microsoft just recently announced Casablanca , a cloud-oriented C++ library and that we intend to open source, and we’re making other even bigger efforts that I hope will bear fruit and I’ll be able to share soon. C++ Cloud Concurrency Software Development

C++ 56

This spring: High-Performance and Low-Latency C++ (Stockholm) and ACCU (Bristol)

Sutter's Mill

I don’t get to Europe very often apart from ISO C++ standards meetings, but this spring I’ve been able to accept invitations for two English-language European events in the last week of April. Tue-Thu Apr 25-27: High-Performance and Low-Latency C++ (Stockholm). On April 25-27, I’ll be in Stockholm (Kista) giving a three-day seminar on “High-Performance and Low-Latency C++.” Will C++ continue growing forever? Can C++ code be simplified?

Elements of Modern C++ Style

Sutter's Mill

As I’m getting ready to resume writing a few new (or updated) Guru of the Week Items for the C++11 era, I’ve been looking through the wonderful features of C++11 and analyzing just which ones will affect the baseline style of how I write modern C++ code, both for myself and for publication.

C++ 52

How Many Warehouses for the HammerDB TPC-C Test?

HammerDB

The official TPC-C test has a fixed number of users per warehouse and uses keying and thinking time so that the workload generated by each user is not intensive. This is a very typical FAQ and although detailed in the documentation some extra details may help in sizing and configuration.

Cross Compiling C/C++ for Android

Nick Desaulniers

Let’s say you want to build a hello world command line application in C or C++ and run it on your Android phone. How would you go about it? It’s not super practical; apps visible and distributable to end users must use the framework (AFAIK), but for folks looking to get into developing on ARM it’s likely they have an ARM device in their pocket.

C++ 41

Finding compiler bugs with C-Reduce

Nick Desaulniers

Support for a long awaited GNU C extension, asm goto , is in the midst of landing in Clang and LLVM. In this post, we’ll take a look at using C-Reduce , a multithreaded code bisection utility for C/C++, to help narrow done a reproducer for a real compiler bug. It’s mostly a post to myself in the future, so that I can remind myself how to run C-reduce on the Linux kernel again, since this is now the third real compiler bug it’s helped me track down.

C++ 40

C++ and Beyond Panel: Modern C++ = Clean, Safe, and Faster Than Ever

Sutter's Mill

I just posted the following panel announcement to the C++ and Beyond site. C++11 is kind of like “C++ Dreamliner.” European readers may equally consider it “C++ 380.” ). C++ Software Development Talks & Events

C++ 52

World’s youngest C++ programmer?

Sutter's Mill

I’m seeing many younger programmers picking up C++. The average age at C++ events over the past year has been declining rapidly as the audience sizes grow with more and younger people in addition to the C++ veterans. He has also gained knowledge of C++, the programming language developed by Danish computer scientist Bjarne Stroustrup, without any formal training. C++ Opinion & Editorial Software Development

C++ 40

The Future of C++: Live broadcast this Friday

Sutter's Mill

In my talk on Friday, there will be announcements of broad interest to C++ developers on all compilers and platforms. The Future of C++. The speaker is the lead language architect of Visual C++ and chair of the ISO C++ committee.

C++ 52

C++ and Beyond Session: Lambdas, Lambdas Everywhere

Sutter's Mill

We’ll be posting abstracts (summaries) of the C++ and Beyond 2010 sessions over the coming days over at the C&B site. Here’s the abstract: Why care about C++0x lambda functions? C++ Software Development Talks & EventsLambdas, Lambdas Everywhere.

C++ AMP keynote is online

Sutter's Mill

Yesterday I had the privilege of talking about some of the work we’ve been doing to support massive parallelism on GPUs in the next version of Visual C++. The video of my talk announcing C++ AMP is now available on Channel 9. Minimal: It adds just one general-purpose language extension that addresses not only the immediate problem (dealing with cores that can’t support full C++) but many others.

C++ 40

Faster remainders when the divisor is a constant: beating compilers and libdivide

Daniel Lemire

I believe that all optimizing C/C++ compilers know how to pull this trick and it is generally beneficial irrespective of the processor’s architecture. In concrete terms, here is the C code to compute the remainder of the division by some fixed divisor d : uint32_t d =. ; // your divisor > 0. uint64_t c = UINT64_C ( 0xFFFFFFFFFFFFFFFF ) / d + 1 ; // fastmod computes (n mod d) given precomputed c. return n * c < = c - 1 ; }.

90 seconds @Build: “It’s a great week for C++”

Sutter's Mill

C++ Microsoft Software Development Talks & EventsA few hours ago I sat down to give a short teaser for my webcast talk this Friday. Here it is. Feel free to forward. (I I don’t think they believed me when I said I could keep it to under two minutes.).

C++ 52

My Final C++ and Beyond 2011 Sessions

Sutter's Mill

I just posted two more sessions I’ll be giving next month at C++ and Beyond. “C++ Renaissance.” keynote talk at C&B 2011, and it’s time to cover an increasingly open secret: After a decade-long affair with managed languages where it became unfashionable to be interested in C++, C++’s power and efficiency are now getting very fashionable again. already know that C++ is “the” language of choice for demanding applications.

C++ 40

Talk + panel online: “(Not Your Father’s) C++” + “Native Languages” Panel

Sutter's Mill

Last week at the Lang.NEXT 2012 conference in Redmond, I gave a 40-minute C++ talk and participated on a native languages panel. Here’s the 40-min C++ talk, taken from the C9 site: (Not Your Father’s) C++ Herb Sutter. What makes ISO C++11 "feel like a new language"?

C++ 52

20 Highly Qualified Test Automation Superstars

DZone

Our world-class expert instructors provide free test automation training in multiple programming languages such as Java, JavaScript, C#, Python, Ruby, and Swift. java javascript python performance c# test automation developers automated testing qa

Two More C&B Sessions: C++0x Memory Model (Scott) and Exceptional C++0x (me)

Sutter's Mill

Scott Meyers, Andrei Alexandrescu and I are continuing to craft and announce the technical program for C++ and Beyond (C&B) 2011 , and two more sessions are now posted. All talks are brand-new material created specifically for C&B 2011. This is stuff that in a perfect world nobody should ever have to know, but in our actual world every modern C++ developer who cares about correct high-performance code has to understand it thoroughly.

C++ 40

C&B Panel: Alexandrescu, Meyers, Sutter on Static If, C++11, and Metaprogramming

Sutter's Mill

The first panel from C++ and Beyond 2012 is now available on Channel 9: On Static If, C++11 in 2012, Modern Libraries, and Metaprogramming. Channel 9 was invited to this year’s C++ and Beyond to film some sessions (that will appear on C9 over the coming months!)…

C++ 52

C&B Session: atomic Weapons – The C++11 Memory Model and Modern Hardware

Sutter's Mill

Here’s another deep session for C&B 2012 on August 5-8 – if you haven’t registered yet, register soon. But there’s just so much about C++11 to cover, so here’s a fourth brand-new session I’ll do at C&B 2012 that goes deeper on its topic than I’ve ever been willing to go before.

Two Sessions: C++ Concurrency and Parallelism – 2012 State of the Art (and Standard)

Sutter's Mill

It’s time for, not one, but two brand-new, up-to-date talks on the state of the art of concurrency and parallelism in C++. I’m going to put them together especially and only for C++ and Beyond 2012 , and I’ll be giving them nowhere else this year: C++ Concurrency – 2012 State of the Art (and Standard). C++ Parallelism – 2012 State of the Art (and Standard). Over the summer, we’ll all be working on updated proposals for the October ISO C++ meeting in Portland.

C++ 40

More fun with fast remainders when the divisor is a constant

Daniel Lemire

There is no silver bullet but a simple C function can beat a state-of-the-art optimizing compiler. C++ optimization performanceIn software, compilers can often optimize away integer divisions, and replace them with cheaper instructions, especially when the divisor is a constant. I recently wrote about some work on faster remainders when the divisor is a constant.

Top Redis Use Cases by Core Data Structure Types

High Scalability

Redis , short for Remote Dictionary Server, is a BSD-licensed, open-source in-memory key-value data structure store written in C language by Salvatore Sanfillipo and was first released on May 10, 2009. C C++ Caching Clustering Database DevOps Message Broker Redis Redis Cluster Redis Hashes Redis Lists Redis Queues Redis Sets Redis Sorted Sets Redis Strings Use Cases administrator cache data management database databases in-memory key-value store nosql open source queue redis

Friday’s Q&A session now online

Sutter's Mill

My live Q&A after Friday’s The Future of C++ talk is now online on Channel 9. C++ Microsoft Software DevelopmentThe topics revolved around….

Java vulnerabilities

Sutter's Mill

From the post: Are the Java vulnerabilities actually C and C++ vulnerabilities? Some other C++ experts who have better sense than I do won’t add the following bit publicly, but I can’t help myself: Insert “write once, pwn everywhere” joke here…. C++ Java Software Development

Java 52

Interview on Channel 9

Sutter's Mill

Channel 9 just posted a new interview with me about ISO C++0x, C++’s place in the modern world, and all things C++. As usual when talking to Herb, the conversation is all about C++ (well, we do talk about C# for a little while, but in the context of C++. It’s always great to talk to Herb and get a glimpse of what goes on in the C++ Standards Committee (which Herb chairs). 15:51 -> Why can’t C++ look more like C#?

My two //build/ talks online

Sutter's Mill

My personal favorite is Writing Modern C++ Code: How C++ Has Evolved Over the Years. The thesis is simple: Modern ISO Standard C++ code is clean, safe, and fast. C++ has got a bad rap over the years, partly earned, but that’s history.

Code 52

Ars: Searching Win8

Sutter's Mill

C++ Microsoft Software DevelopmentCheck out Ars’ choice of search term about 2/3 of the way down the page. Hi-res here.

C++ 52

Late-Breaking C&B Session: A Special Announcement

Sutter's Mill

At the end of the Monday afternoon session, I will be making a special announcement related to Standard C++ on all platforms. Be there to hear the details, and to receive an extra perk that’s being reserved for C&B 2012 attendees only. C++ Software Development Talks & Events

VC++ and Win8 Metro apps: May 18, livestream and on-demand

Sutter's Mill

Want to know how to write cool tablet apps using Visual C++? On May 18, Microsoft is hosting a one-day free technical event for developers who want to write Metro apps for Windows 8 using Visual C++. From the page: Join the Microsoft Visual C++ and Windows teams in Redmond on May 18, 2012 for a free, all-day event focused on building Windows 8 Metro style apps with C++. this day is about Visual C++, not Visual C# or JavaScript).

Games 40

Podcast: Interview on Hanselminutes

Sutter's Mill

A few weeks ago at the Build conference, Scott Hanselman and I sat down to talk about C++ and modern UI/UX. The podcast is now live here: The Hanselminutes Podcast, Show #346 “Why C++” with Herb Sutter. Topics Scott raises include: 2:00 Scott mentions he has used C++ in the past. C++ has changed. We still call it C++, but it’s a very different language now. 13:45 C++ is having a resurgence. Where is C++ big? or, What is C++ good at?

Media 40

Recommended reading: Why mobile web apps are slow (Drew Crawford)

Sutter's Mill

show some promise, but even if they win you will be using C/C++ or similar “backwards” language as a frontend, rather than something dynamic like JavaScript. I don’t often link to other articles, but this one is worth reading. Why mobile web apps are slow. by Drew Crawford. …

Compatibility

Sutter's Mill

On yesterday’s thread, I just wrote in a comment: @Jon: Yes, C++ is complex and the complexity is largely because of C compatibility. C++ Software Development

T-SQL bugs, pitfalls, and best practices – Joins

SQL Performance

However, a typical bug when converting the existing solution to one that applies the join is to leave the computation of the order count as COUNT(*), as shown in the following query (call it Query 1): SELECT C. Customers AS C LEFT OUTER JOIN Sales. Orders AS O ON C. GROUP BY C.