juan_gandhi: (Default)
[personal profile] juan_gandhi
A couple of days ago I spent half of the day working with some c code. Not a beautiful one, regular. Plain c.

Well, it fast like a lightning. It's been a while; and I remember compiling c in two compilers for 4 memory models; I did remodel my apartment while this was going on. It was 25 years ago, well, the world has changed, but c has not.

So maybe I should use it from time to time, I don't know. Forth must be fast too.

Or is it just me.

I know, neither is scalable. Or it could be, could it? 

Date: 2017-02-02 07:15 am (UTC)
thedeemon: (Default)
From: [personal profile] thedeemon
Are google and yandex search engines scalable? Written in C++.

Во-во

Date: 2017-02-02 09:08 am (UTC)
From: [personal profile] andy_ivanov
C++ ещё и
"все" операционки

Date: 2017-02-02 10:59 am (UTC)
irene221b: (Default)
From: [personal profile] irene221b
Not scalable as in can't take advantage of some fancy hardware, or not scalable as in can't develop large projects in it?

Date: 2017-02-02 12:04 pm (UTC)

Date: 2017-02-02 10:05 pm (UTC)
irene221b: (Default)
From: [personal profile] irene221b
I'm a strong believer in "It's the carpenter, not the tools" paradigm. Either a team has good software engineering culture, or they don't. The first team will have a maintainable codebase in almost any language, the second will have ball of mud in any language.

Date: 2017-02-03 07:27 am (UTC)
From: [identity profile] gineer.livejournal.com
And have strong goal...

To be exact -- even crowd of poor workers can achieve great result if set them in narrow conditions and under big and shine goal. ;)

Date: 2017-02-03 10:25 am (UTC)
irene221b: (Default)
From: [personal profile] irene221b
Это маоизм какой-то. :)

Date: 2017-02-04 08:06 am (UTC)
From: [identity profile] gineer.livejournal.com
Почему маоизм?

Просто попытки грокнуть тему Генерал ИИ ;)

Как оказывается, там все крутится вокруг призрачной оси с лейбочкой "мотивация". ;)

Date: 2017-02-06 02:59 am (UTC)
From: [personal profile] zyxman
Крутиться это такое танцевальное па, очевидно.
Мао очень любил танцы :)

Date: 2017-02-07 07:46 am (UTC)

Date: 2017-02-06 03:46 am (UTC)
From: [personal profile] zyxman
Forth is not fastest.

This is because stack machine is not well suited for modern architectures with large pipelines.

Forth is just don't use pipeline length - Forth works with extremely short commands chains, and makes pipeline reload on every word of data.

Pipelines prefer to work with long command chains and these chains should not contain jumps (yes, pipeline hate goto's, and prefer vectors of fundamental machine type).

Other minor issue, that Forth uses only one index register for any single step (good optimized C compiler use absolute access, and sure could use registers for variables, and even could vectorize programs automatically).

So typical Fort on old CPU (before pipelined) is magnitude slower than C, and on modern architectures may be 2 magnitudes.

Good thing, Forth may be the best, when need to make some assembler includes (better than C).
So if fast mean, that you could make assembler includes - Forth is best choice.

Example of asm optimize could be something like compare two vectors of 32-bit integers with vector commands - this is at least 4 times faster than classic C.
But it is not well suited for Unicode data (because need conversion or some sort of one-symbol per step work).
To be honest, I have not looked under the hood of Unicode processing, may be things better.

For scalable, the main issue with Forth is that it is tightly coupled to fundamental machine types (not Scala types).

But as I hear, exists few groups, which used some sort of functional programming with Forth. And they said, Forth is very well suited for functional :)
So may be new people could make things much better.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

May 2025

S M T W T F S
    1 2 3
456 7 8 9 10
11 121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 15th, 2025 08:49 pm
Powered by Dreamwidth Studios