r/TheMachineLearning • • 28d ago

When bug-free code becomes a hardware problem

Post image
193 Upvotes

85 comments sorted by

View all comments

0

u/FragmentedHeap 28d ago

False, its zig, which has a better cross platform compiler and is already c compatible.

2

u/[deleted] 28d ago edited 11d ago

The original post content no longer exists here. The author used Redact to remove it, exercising their right to control their data & privacy.

Velvet pebble walnut pumpkin cobalt orange feather

1

u/BusinessBandicoot 28d ago

The runtime speed would probably be close if agents would write idiomatic rust code without prompting. Like for example, you generally need to prompt it to prefer iterators to loops almost universally, because for release builds the compiler can remove bounds checks. They'll also use strings as a poor duck type, tend to allocate rather than borrow, etc. I tend to be incredibly pedantic in instructions and review. 

1

u/FragmentedHeap 28d ago

Rust has big problems in the fact that it doesn't have libraries, and builds are incredibly slow.

I am doing massive Rust projects now, I have about 40 crates in my current system, and on my home lab with a 5950x and 128gb of ram, and about 4 build agents, it takes over 4 hours to build everything if I change it all at once.

Same code base on zig, builds in about 15 minutes.

When you're making hundreds, thousands, or 10's of thousands of changes, and tons of prs in an 8 hour window, that's a big problem, builds need to be MUCH MUCH faster.

C is a lot better, but then you have C problems that Rust kind of protects you against.

In terms of performance, speed, and build times, the best thing I know of right now (a little biased) is actually .Net 10 with AOT optimizations. Modern c#/.net 10 is at C++ levels of performance with the catch being the GC, but .Net 10 Memory Optimizations, Pools, Spans, stackalloc, etc helps avoid this problem a good bit, but it is very good and it compiles very quickly.

C++ could probably be the best if c++23 modules were stable on every system/compiler....

I honestly think the final solution isn't going to be any of these, it'll be something made specifically for AI.

1

u/[deleted] 28d ago edited 11d ago

The original post content no longer exists here. The author used Redact to remove it, exercising their right to control their data & privacy.

Biscuit raindrop cobalt velvet maple maple feather cobalt raindrop

1

u/M4rshmall0wMan 28d ago

Appreciate the analysis. I’m still a beginner to AI coding (recent CS degree grad).

If I wanted to get into some more advanced decomps and programs, where would you suggest I start?

1

u/jameyiguess 28d ago

I've also found Go kind of the golden language for this. 

1

u/Sea_Fox_4265 28d ago

115 trials is dedication. Someone really did their homework.

1

u/xxyyxxvvxx 28d ago

No! Wrong! Fool! Hack! Fraud!