Live data from Hacker News

Starting a tech startup with C++

medium.com

91–100 of 107 posts

Re: Starting a tech startup with C++

#91

I would like to see one other aspect discussed though: quickness to market. At my job, we are rewriting some pretty terrible vb5 code. It's easy to just WTF a lot, and complain that there are truly insane things inside of it. The flipside of that, is that this code was quickly built and quickly allowed for a revenue stream. The author mentioned that thrown away python code provides no value, but I'm not convinced of…

Additionally, Python plays well with C, so perhaps some of the performance killing portions could have been replaced with C.

Re: Starting a tech startup with C++

#92
post #39

For databases, C/C++ is still the only reasonable choice. For OLAP cubes in particular, you want to keep as much data in memory as possible as efficiently as possible, and drop down to SSE intrinsics where needed. C++ lets you do just that. Frontend can be in any language you like.

There are several other languages that have "ability keep as much data in memory as possible as efficiently as possible" and "drop down to SSE intrinsics" as features. C and C++ by no means have a monopoly here.

Re: Starting a tech startup with C++

#93
post #39

For databases, C/C++ is still the only reasonable choice. For OLAP cubes in particular, you want to keep as much data in memory as possible as efficiently as possible, and drop down to SSE intrinsics where needed. C++ lets you do just that. Frontend can be in any language you like.

There are several other languages that have "ability keep as much data in memory as possible as efficiently as possible" and "drop down to SSE intrinsics" as features. C and C++ by no means have a monopoly here.

How battle tested are those languages? How many outstanding bugs do they have in their compilers and libraries? How good is tooling support? How easy is it to find competent programmers? How well do they interoperate with existing high performance libraries? That's just a small sample of issues you need to consider when starting a serious project. I maintain that it's hard to compete with C/C++ on all of those criteria.

Re: Starting a tech startup with C++

#94
post #59

I wonder why the choice of language is framed as being between C++ and Ruby/Python? Yes, C++ is known for being fast while suffering from a shortage of easy libraries and being more verbose to write and intellectually challenging to write in, while the mainstream dynamic languages are known for being not so fast but having a vast array of handy, easy to integrate libraries and being fast to develop in. But I think th…

> I'd probably be most tempted to check out Go if I was working on something that absolutely had to wring the best possible performance out of my hardware. I don't honestly know that much about it, but it has a reputation for getting you most of the performance of C++ without the complexity. Go isn't billed as a language that is designed to do that. It's faster than Ruby and Python, for sure, but it made many runtime…

The GC has been drastically improved recently and going to get another improvement in the next release - Go 1.6. Either way, if Python was considered, Go isn't less fit to be considered.

Re: Starting a tech startup with C++

#95

I would like to see one other aspect discussed though: quickness to market. At my job, we are rewriting some pretty terrible vb5 code. It's easy to just WTF a lot, and complain that there are truly insane things inside of it. The flipside of that, is that this code was quickly built and quickly allowed for a revenue stream. The author mentioned that thrown away python code provides no value, but I'm not convinced of…

Additionally, Python plays well with C, so perhaps some of the performance killing portions could have been replaced with C.

Not only that. A lot of the modules in the Python standard library are written in C; some may be thin wrappers over the corresponding C library. So when you call that code in your app, it runs at (nearly) the speed of C. Same could apply to other languages like Ruby too, that follow that model.

Re: Starting a tech startup with C++

#96

Earlier quoted context omitted.

Well said! Dynamic memory allocation is a really big performance hit, and in a lot of cases you can pre-allocate data structures on the stack for serious speed improvements. Avoiding DMA was one of the secrets for writing blazing fast real time systems stuff when I was in telecom. I don't think those benefits have gone away.

You and I can't possibly have the same definition of DMA. It is essential to low latency data communication both in the embedded and server domain.

I thought he meant the hardware-related meaning of DMA too, for a second. But the first line of his comment is:

>Well said! Dynamic memory allocation is a really big performance hit

Re: Starting a tech startup with C++

#97

Earlier quoted context omitted.

I like the quip but that's barely an answer given OP avoided Rust specifically. There's a difference between a high-performing language in development (and debugging) vs a high-performing language with over a decade of work into its tooling and support. The latter's strengths and weaknesses are known through and through with many implementation and library problems likely worked out long ago. So, if it was apples to…

Absolutely. I was responding more to this conversation than the author; they specifically said "new" languages :) Your points are all legit. Unfortunately, the only way to get an old language is to start with a new one, and then let time pass.

Last sentence is quotable :)

Re: Starting a tech startup with C++

#98

Earlier quoted context omitted.

> I'd probably be most tempted to check out Go if I was working on something that absolutely had to wring the best possible performance out of my hardware. I don't honestly know that much about it, but it has a reputation for getting you most of the performance of C++ without the complexity. Go isn't billed as a language that is designed to do that. It's faster than Ruby and Python, for sure, but it made many runtime…

The GC has been drastically improved recently and going to get another improvement in the next release - Go 1.6. Either way, if Python was considered, Go isn't less fit to be considered.

> The GC has been drastically improved recently and going to get another improvement in the next release - Go 1.6.

I wasn't just referring to the GC.

Re: Starting a tech startup with C++

#99
post #93

Earlier quoted context omitted.

There are several other languages that have "ability keep as much data in memory as possible as efficiently as possible" and "drop down to SSE intrinsics" as features. C and C++ by no means have a monopoly here.

How battle tested are those languages? How many outstanding bugs do they have in their compilers and libraries? How good is tooling support? How easy is it to find competent programmers? How well do they interoperate with existing high performance libraries? That's just a small sample of issues you need to consider when starting a serious project. I maintain that it's hard to compete with C/C++ on all of those criter…

Moving the goalposts to "every single advantage C++ might possibly possess" isn't very interesting. The idea that using a new language can only be justified if the language surpasses C++ in every conceivable way is very 1995, pre-PL Renaissance thinking.

In reality, you can only choose programming languages by balancing all the factors in question, and C++ has plenty of disadvantages for databases: it's unsafe, it's difficult to learn, compile times are poor, there's no package manager, etc.

Re: Starting a tech startup with C++

#100
post #97

Earlier quoted context omitted.

Absolutely. I was responding more to this conversation than the author; they specifically said "new" languages :) Your points are all legit. Unfortunately, the only way to get an old language is to start with a new one, and then let time pass.

Last sentence is quotable :)

I agree haha.
Post reply on HN