← Home ← Back to /g/

Thread 106298997

42 posts 12 images /g/
Anonymous No.106298997 >>106299032 >>106299041 >>106299055 >>106299069 >>106299952 >>106301896 >>106303407
C# can be compiled to native now.

Rewriting my C++ gaym engine in C# using Ai right fucking now.
Good fucking riddance.
Header-Source-Duality never fucking again.
Fuck !
Anonymous No.106299032
>>106298997 (OP)
Thereโ€™s also this for low-level stuff https://devblogs.microsoft.com/dotnet/dotnet-8-hardware-intrinsics/.
Anonymous No.106299041 >>106299075 >>106299162 >>106304883
>>106298997 (OP)
Can the garbage collector be turned off?
Anonymous No.106299055 >>106299219 >>106299224 >>106299907
>>106298997 (OP)
You should've been writing it in Rust with ECS in the first place
Anonymous No.106299069
>>106298997 (OP)
If the MSM has redefined "now" to mean "for at least 15 years", sure.
Anonymous No.106299075 >>106299109 >>106299805 >>106303310
>>106299041
No. But supposedly it's easy to avoid generating garbage in modern C# and it doesn't really matter if it's not per-frame.
Anonymous No.106299109 >>106299177 >>106299805
>>106299075
>supposedly it's easy to avoid generating garbage in modern C#
I wouldn't say easy. But possible.
Question is engine support. Did Unity switch to Core yet? How useful is optimized C# in Godot?
Anonymous No.106299116 >>106299134 >>106302310
you are a retard op. when you compile your cshart calculator application it will lose its reflection. you do not gain performance when you compile it, just that you no longer need the jit compiler to execute the program.
Anonymous No.106299134 >>106302310
>>106299116
C# has been trying to make reflection-less code possible lately. Using code generators during build instead of reflection during runtime.
Anonymous No.106299162 >>106300701
>>106299041
Using object pools and stack allocation obviates much of the GC use.

OP is a baiting faggot, though. AOT compilation is only useful for initial running of code and is actually a performance detriment over time as the runtime can optimize the JIT'd code over time. A program that runs once and exits relatively quickly will benefit from AOT but a game with will execute for minutes to hours would be better off using JIT. You can still target specific platforms and intrinsics without AOT.
Anonymous No.106299177
>>106299109
Unity has been "switching to Core" for like three years now. They're still working on it.
Godot has extremely high overhead for calls into the engine, apparently, so C# doesn't buy much. Also C# doesn't work on half the targets, I think?
Anonymous No.106299219 >>106299876
>>106299055
Don't transgender people use Rust? Why would I use technology partially created and used by people who do things to their own minds and bodies that don't personally affect my life in the slightest when I could use something that has less features but creates entertaining internet drama and gives me the chance to cry around the office tomorrow with my conservative butt-buddies about what a victim I am because StackOverflow banned me someone asked for help with a "hello world" program in Rust and I went off on a rant about how the Jews want to use an obscure memory-safe programming language to cut your childrens' penis off and there are subliminal reptilian messages programmed to make the frogs gay embedded within the start noises of Windows XI?
>Windows XI
That's right, it's Windows XI. I'm not using an arbitrary number system created by Muslim terrorist infidels when I could use the pure, Christian, white American Roman Numeral system.
Anonymous No.106299224
>>106299055
>your game engine in rust.
It's over 11 years old and no I would not use Rust, the syntax is fucking terrible and the paradigms tiresome and needles if you're good at what you do.
Anonymous No.106299805 >>106299824 >>106299856 >>106300018
>>106299075
>>106299109
I am writing my own .net based engine and it's not easy because 99.9% of all libraries use the garbage collector without care, so you will have to write everything yourself.
Anonymous No.106299824 >>106301052 >>106303354
>>106299805
using libraries is for faggots anyway
the only thing you need libraries for is super complex tasks like video encoding
Anonymous No.106299856 >>106304537 >>106304554
>>106299805
this may not seem intuitive, but for short lived objects it's better to generate garbage than using object pools.
Anonymous No.106299876
>>106299219
>Windows XI Jinping
Sounds about right
>Rome is American
Anonymous No.106299907 >>106303416
>>106299055
Zig/Odin with ECS*
Anonymous No.106299952 >>106305067 >>106305123
>>106298997 (OP)
They just bundle a chunk of the CLR with your binary. It will be miles off C++ in terms of performance.
>inb4 some cunt posting meme marks
Kill yourself.
Anonymous No.106300018
>>106299805
There is an experimental GC for dotnet with sub ms pauses, I don't remember what it's called
Anonymous No.106300701 >>106304995
>>106299162
>AOT is actually a performance detriment over time as the runtime can optimize the JIT'd code over time
Modern AOT uses PGO too
Anonymous No.106300890
More like Jeet compiler. Bazinga!
Anonymous No.106301052 >>106301854
>>106299824
>using libraries is for faggots anyway
handmade nocoder detected
Anonymous No.106301854
>>106301052
>frame time: 24.14ms
Anonymous No.106301896
>>106298997 (OP)
Native yes, but managed code is still going to be slower.
Anonymous No.106302310 >>106302971
>>106299116
>>106299134
>c# removes reflection
>c++26 adds reflection
Anonymous No.106302971
>>106302310
C++26 adds compile-time "reflection".
Anonymous No.106303310
>>106299075
Anonymous No.106303354
>>106299824
>using libraries is for faggots anyway
never seen someone out themselves as a nocoder this hard before
Anonymous No.106303407
>>106298997 (OP)
>Header-Source-Duality never fucking again.
Have you heard of our lord and saviour modules?
Anonymous No.106303416
>>106299907
Memelangs that no one uses, buy an ad fag
Anonymous No.106303502 >>106303555
We don't use C# because it's not native, we don't use it because everything Microsoft does is a trap to ensnare you into their paid/licensing/subscription ecosystem.
Anonymous No.106303555 >>106303887
>>106303502
Java won btw
Anonymous No.106303887
>>106303555
Anonymous No.106304537 >>106304554
>>106299856
It's better still to just stackalloc if you can. readonly ref structs are a godsent for performance sensitive hot spots as well.
Anonymous No.106304554
>>106299856
>>106304537

How do you profile that?
Anonymous No.106304653
Java syntax sucks and has way too much oop
Anonymous No.106304658
it's been a thing for years now (ILL2CPP)
just that isn't really needed outside of muh games since JIT works just as well
Anonymous No.106304883
>>106299041
https://www.nuget.org/packages/NullGC.Linq
Anonymous No.106304995
>>106300701
Cite sauce for dotnet pls because everything I read says youโ€™re wrong
Anonymous No.106305067
>>106299952
No, youโ€™re referring to self contained executables which obviates runtime installation and is different than native AOT.
Anonymous No.106305123
>>106299952
>dont @ me with evidence that disproves my take