• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

I am interested in C/C++

Do you think i can learn C/C++?


  • Total voters
    20
Joined
Jun 17, 2007
Messages
7,335 (1.20/day)
Location
C:\Program Files (x86)\Aphexdreamer\
System Name Unknown
Processor AMD Bulldozer FX8320 @ 4.4Ghz
Motherboard Asus Crosshair V
Cooling XSPC Raystorm 750 EX240 for CPU
Memory 8 GB CORSAIR Vengeance Red DDR3 RAM 1922mhz (10-11-9-27)
Video Card(s) XFX R9 290
Storage Samsung SSD 254GB and Western Digital Caviar Black 1TB 64MB Cache SATA 6.0Gb/s
Display(s) AOC 23" @ 1920x1080 + Asus 27" 1440p
Case HAF X
Audio Device(s) X Fi Titanium 5.1 Surround Sound
Power Supply 750 Watt PP&C Silencer Black
Software Windows 8.1 Pro 64-bit
You've just got to start programming as much as you can.

Start thinking about how you can take real world problems and turn it into a program and try coding that, main thing being you want to code.

Practice makes perfect.
 
Joined
Jul 23, 2011
Messages
1,586 (0.34/day)
Location
Kaunas, Lithuania
System Name my box
Processor AMD Ryzen 9 5950X
Motherboard ASRock Taichi x470 Ultimate
Cooling NZXT Kraken x72
Memory 2×16GiB @ 3200MHz, some Corsair RGB led meme crap
Video Card(s) AMD [ASUS ROG STRIX] Radeon RX Vega64 [OC Edition]
Storage Samsung 970 Pro && 2× Seagate IronWolf Pro 4TB in Raid 1
Display(s) Asus VG278H + Asus VH226H
Case Fractal Design Define R6 Black TG
Audio Device(s) Using optical S/PDIF output lol
Power Supply Corsair AX1200i
Mouse Razer Naga Epic
Keyboard Keychron Q1
Software Funtoo Linux
Benchmark Scores 217634.24 BogoMIPS
Every time someone refers to C and C++ as some singe entity, or worse - do so by using "C/C++" God kills a kitten.
...And someone programmer almost breaks his/her glasses due to a facapalming reflex.
Seriously, Don't do it. Please.
C and C++ are way too different to be refered as such.
Thank You.

Back on topic: If You do have the patience to learn C and/or C++, or better yet - master one or both, I'd say - go for it. Not only it will teach You programming, but also a lot of other skills that will probably be very useful overall. Even in things not even related to computers. Not to mention it greatly develops logical thinking and discipline. A tripple Win! :)
 
Joined
Sep 3, 2010
Messages
3,527 (0.71/day)
Location
Netherlands
System Name desktop | Odroid N2+ |
Processor AMD Ryzen 5 3600 | Amlogic S922X |
Motherboard Gigabyte B550M DS3H |Odroid N2+ |
Cooling Inter-Tech Argus SU-200, 3x Arctic P12 case fans | stock heatsink + fan |
Memory Gskill Aegis DDR4 32GB | 4 GB DDR4 |
Video Card(s) Sapphire Pulse RX 6600 (8GB) | Arm Mali G52 |
Storage SK Hynix SSD 240GB, Samsung 840 EVO 250 GB, Toshiba DT01ACA100 1T | Samsung 850 Evo 500GB |
Display(s) AOC G2260VWQ6 | LG 24MT57D |
Case Asus Prime 201 | Stock case (black version) |
Audio Device(s) integrated
Power Supply BeQuiet! Pure Power 11 400W | 12v barrel jack |
Mouse Logitech G500 |Steelseries Rival 300
Keyboard Qpad MK-50 (Cherry MX brown)| Blaze Keyboard
Software Windows 10, Various Linux distros | Gentoo Linux
^^ Even I (someone with no more programming experience than some basics in Pascal/Delphi, a long time ago) understand that C and C++ are different. C is differently oriented while also being of a lower level than C++ (am I right about that?).
 

eidairaman1

The Exiled Airman
Joined
Jul 2, 2007
Messages
40,435 (6.61/day)
Location
Republic of Texas (True Patriot)
System Name PCGOD
Processor AMD FX 8350@ 5.0GHz
Motherboard Asus TUF 990FX Sabertooth R2 2901 Bios
Cooling Scythe Ashura, 2×BitFenix 230mm Spectre Pro LED (Blue,Green), 2x BitFenix 140mm Spectre Pro LED
Memory 16 GB Gskill Ripjaws X 2133 (2400 OC, 10-10-12-20-20, 1T, 1.65V)
Video Card(s) AMD Radeon 290 Sapphire Vapor-X
Storage Samsung 840 Pro 256GB, WD Velociraptor 1TB
Display(s) NEC Multisync LCD 1700V (Display Port Adapter)
Case AeroCool Xpredator Evil Blue Edition
Audio Device(s) Creative Labs Sound Blaster ZxR
Power Supply Seasonic 1250 XM2 Series (XP3)
Mouse Roccat Kone XTD
Keyboard Roccat Ryos MK Pro
Software Windows 7 Pro 64
^^ Even I (someone with no more programming experience than some basics in Pascal/Delphi, a long time ago) understand that C and C++ are different. C is differently oriented while also being of a lower level than C++ (am I right about that?).

C++ is originally an Evolution of C.
 

eidairaman1

The Exiled Airman
Joined
Jul 2, 2007
Messages
40,435 (6.61/day)
Location
Republic of Texas (True Patriot)
System Name PCGOD
Processor AMD FX 8350@ 5.0GHz
Motherboard Asus TUF 990FX Sabertooth R2 2901 Bios
Cooling Scythe Ashura, 2×BitFenix 230mm Spectre Pro LED (Blue,Green), 2x BitFenix 140mm Spectre Pro LED
Memory 16 GB Gskill Ripjaws X 2133 (2400 OC, 10-10-12-20-20, 1T, 1.65V)
Video Card(s) AMD Radeon 290 Sapphire Vapor-X
Storage Samsung 840 Pro 256GB, WD Velociraptor 1TB
Display(s) NEC Multisync LCD 1700V (Display Port Adapter)
Case AeroCool Xpredator Evil Blue Edition
Audio Device(s) Creative Labs Sound Blaster ZxR
Power Supply Seasonic 1250 XM2 Series (XP3)
Mouse Roccat Kone XTD
Keyboard Roccat Ryos MK Pro
Software Windows 7 Pro 64
It takes patience for this kind of programming language.

Staying away from Drugs? Yes

Staying away from Gothic Women? No- have as much fun as you can

I tried messing around with C+ a few months back with the encouragement of Kreij. I didn't even know what the terms meant to even start. I needed a day one schooling for this stuff. Not "How do you compile" but "What is it that am I compiling and what IS compiling". lol

Even the tutorials to me were like "WTF am I READING?!" Aerospace technology is WAY more simple then this stuff.

Maybe I'm just to old to learn this kinda stuff. If your going for it at 13 years old gopal, don't let any of these people on a tech forum stop you. Learn it while you are young and stick with it through school. THEN go to school for it. Epic pay days can be had this way. I made a mistake long ago listening to people on career choices. IF I had stuck with what I enjoyed I would be working for Boeing or McDonnell Douglas right now.....like everyone else I went to school with lol.......but NOOOOOO I had to be different and pursue art.

EDIT: Also stay away from drugs and goth girls. Another mistake I made.
 
Joined
Dec 2, 2009
Messages
3,351 (0.64/day)
System Name Dark Stealth
Processor Ryzen 5 5600x
Motherboard Gigabyte B450M Gaming rev 1.0
Cooling Snowman, arctic p12 x2 fans
Memory 16x2 DDR4 Corsair Dominator Pro
Video Card(s) 3080 10gb
Storage 2TB NVME PCIE 4.0 Crucial P3 Plus, 1TB Crucial MX500 SSD, 4TB WD RED HDD
Display(s) HP Omen 34c (34" monitor 3440x1440 165Hz VA panel)
Case Zalman S2
Power Supply Corsair 750TX
Mouse Logitech pro superlight, mx mouse s3, Razer Basiliskx with battery
Keyboard Custom mechanical keyboard tm680
Software Windows 11
Benchmark Scores 70-80 fps 3440x1440 on cyberpunk 2077 max settings
Why goth girls?
What about girls? (without any type like goth)
 
Joined
Nov 12, 2013
Messages
74 (0.02/day)
You got the right idea there and the thinking now just write the source code and compile it. You won't learn anything if someone does it for you. If you really need it perhaps there's source code for the same idea online for download.
 
Joined
Dec 27, 2008
Messages
587 (0.11/day)
System Name PC
Processor i5 2500k
Motherboard P8Z68-V PRO/GEN3
Cooling Fans
Memory DDR3-1600 (8GB)
Video Card(s) Sapphire Nitro+ RX 580
Storage HD103SJ
Display(s) XG2402
Case Xigmatek Midgard II
Power Supply PC Power & Cooling Silencer 750W
You got the right idea there and the thinking now just write the source code and compile it. You won't learn anything if someone does it for you. If you really need it perhaps there's source code for the same idea online for download.

I'm just gonna throw this out there.

You do realize you're suggesting someone do something they were trying to do over a year ago.
 
Joined
Dec 9, 2013
Messages
911 (0.24/day)
System Name BlueKnight
Processor Intel Celeron G1610 @ 2.60GHz
Motherboard Gigabyte GA-H61M-S2PH (rev. 1.0)
Memory 1x 4GB DDR3 @ 1333MHz (Kingston KVR13N9S8/4)
Video Card(s) Onboard
Storage 1x 160GB (Western Digital WD1600AAJS-75M0A0)
Display(s) 1x 20" 1600x900 (PHILIPS 200VW9FBJ/78)
Case μATX Case (Generic)
Power Supply 300W (Generic)
Software Debian GNU/Linux 8.7 (jessie)
I wouldn't recommend C/C++ to anyone. But "Yes, you can" learn it.

It all depends on your will to learn and/or dedication.
 
Joined
Feb 8, 2012
Messages
3,012 (0.68/day)
Location
Zagreb, Croatia
System Name Windows 10 64-bit Core i7 6700
Processor Intel Core i7 6700
Motherboard Asus Z170M-PLUS
Cooling Corsair AIO
Memory 2 x 8 GB Kingston DDR4 2666
Video Card(s) Gigabyte NVIDIA GeForce GTX 1060 6GB
Storage Western Digital Caviar Blue 1 TB, Seagate Baracuda 1 TB
Display(s) Dell P2414H
Case Corsair Carbide Air 540
Audio Device(s) Realtek HD Audio
Power Supply Corsair TX v2 650W
Mouse Steelseries Sensei
Keyboard CM Storm Quickfire Pro, Cherry MX Reds
Software MS Windows 10 Pro 64-bit
This is how to learn C++ in 21 days:

... but seriously, just get to day 697 and you'll be good enough to contribute.
 
Joined
Dec 9, 2013
Messages
911 (0.24/day)
System Name BlueKnight
Processor Intel Celeron G1610 @ 2.60GHz
Motherboard Gigabyte GA-H61M-S2PH (rev. 1.0)
Memory 1x 4GB DDR3 @ 1333MHz (Kingston KVR13N9S8/4)
Video Card(s) Onboard
Storage 1x 160GB (Western Digital WD1600AAJS-75M0A0)
Display(s) 1x 20" 1600x900 (PHILIPS 200VW9FBJ/78)
Case μATX Case (Generic)
Power Supply 300W (Generic)
Software Debian GNU/Linux 8.7 (jessie)
It is the best language for beginner who want to start learning programming. C language is easy to learn and understand.
I disagree. In my opinion, every beginner should start with the lower level language possible (e.g.: Assembly, using an assembler and not programming bit by bit).

Why? High level programming languages are too "complex" and hides the fundamental basics of how a program really works. And even complicates simple things (often)...

Why? I started with a high level programming language and after I met Assembly, I wished I could start with it because I really learned how the things work with it. And after I met Assembly I could understand and learn higher level languages a LOT better and easier.

That's my opinion!
 

Frick

Fishfaced Nincompoop
Joined
Feb 27, 2006
Messages
18,914 (2.86/day)
Location
Piteå
System Name Black MC in Tokyo
Processor Ryzen 5 5600
Motherboard Asrock B450M-HDV
Cooling Be Quiet! Pure Rock 2
Memory 2 x 16GB Kingston Fury 3400mhz
Video Card(s) XFX 6950XT Speedster MERC 319
Storage Kingston A400 240GB | WD Black SN750 2TB |WD Blue 1TB x 2 | Toshiba P300 2TB | Seagate Expansion 8TB
Display(s) Samsung U32J590U 4K + BenQ GL2450HT 1080p
Case Fractal Design Define R4
Audio Device(s) Line6 UX1 + some headphones, Nektar SE61 keyboard
Power Supply Corsair RM850x v3
Mouse Logitech G602
Keyboard Cherry MX Board 1.0 TKL Brown
VR HMD Acer Mixed Reality Headset
Software Windows 10 Pro
Benchmark Scores Rimworld 4K ready!
I disagree. In my opinion, every beginner should start with the lower level language possible (e.g.: Assembly, using an assembler and not programming bit by bit).

Why? High level programming languages are too "complex" and hides the fundamental basics of how a program really works. And even complicates simple things (often)...

Why? I started with a high level programming language and after I met Assembly, I wished I could start with it because I really learned how the things work with it. And after I met Assembly I could understand and learn higher level languages a LOT better and easier.

That's my opinion!

C is pretty low to begin with. Assembly is probably fine, but these days I think it's a bit too abstract (if by abstract you mean hard to understand). You obviously need it sometimes, but if you just want to program as a hobby and dabble with electronics C is pretty good I think.
 
Joined
Dec 9, 2013
Messages
911 (0.24/day)
System Name BlueKnight
Processor Intel Celeron G1610 @ 2.60GHz
Motherboard Gigabyte GA-H61M-S2PH (rev. 1.0)
Memory 1x 4GB DDR3 @ 1333MHz (Kingston KVR13N9S8/4)
Video Card(s) Onboard
Storage 1x 160GB (Western Digital WD1600AAJS-75M0A0)
Display(s) 1x 20" 1600x900 (PHILIPS 200VW9FBJ/78)
Case μATX Case (Generic)
Power Supply 300W (Generic)
Software Debian GNU/Linux 8.7 (jessie)
C is pretty low to begin with.
Compared to raw Assembly it is pretty high, especially pointers and arrays (for example).

Not to mention the "if, else, and, or" and other operators that make multiple/complex comparisons much faster than if coded in raw Assembly.
 
Last edited:
Joined
Jan 13, 2014
Messages
436 (0.12/day)
Location
Riga
System Name Pukeko
Processor Ryzen 5 3600
Motherboard MSI B450 Gaming Plus Max
Cooling Hyper 212 Black Edition
Memory Corsair Vengeance LPX 16GB 3000MHz DDR4 CL15
Video Card(s) Asus RX 5600 XT TUF Gaming X3 OC
Storage XPG SX8200 Pro 256GB, Crucial MX500 1TB
Display(s) 2x ASUS TUF Gaming VG249Q
Case NZXT, H510i, Matte Black/Red, Tempered Glass
Audio Device(s) TUF Gaming H3
Power Supply Seasonic PRIME Ultra 550W Gold
Mouse Touchpad + Logitech MX518
Keyboard Cooler Master, CK 350, Outemu Red
Software Windows 10
Benchmark Scores 7,42,69 and 666
I started programming in Pascal, then went to C, then to C++, then Java. Pascal was good to learn the core basics, although it's more or less useless practically. I'd say, don't start low-level, rather go high and then down. To be honest, Java could be a good starting point, it can be very high level, but you can easily get the basics out and when you are ready, go down to C++ to really understand what that 'new' operator is, what's a memory leak etc. Low level can be a bot too broad to grasp, but that's just me :)
 
Joined
Dec 9, 2013
Messages
911 (0.24/day)
System Name BlueKnight
Processor Intel Celeron G1610 @ 2.60GHz
Motherboard Gigabyte GA-H61M-S2PH (rev. 1.0)
Memory 1x 4GB DDR3 @ 1333MHz (Kingston KVR13N9S8/4)
Video Card(s) Onboard
Storage 1x 160GB (Western Digital WD1600AAJS-75M0A0)
Display(s) 1x 20" 1600x900 (PHILIPS 200VW9FBJ/78)
Case μATX Case (Generic)
Power Supply 300W (Generic)
Software Debian GNU/Linux 8.7 (jessie)
Pascal was good to learn the core basics, although it's more or less useless practically.
You must be kidding or you do not know Pascal enough. The "Free Pascal Compiler" is simply great and very complex/advanced.

As a "Free Pascal" user I can say it is a VERY POWERFUL compiler and you won't feel the absence of C or other high level languages with it (as I did). Anyway, for other specific things that can't be done in Pascal (or any other high level language), Assembly is there for you.

But for general programming, it is much more than enough.
 
Joined
Jan 13, 2014
Messages
436 (0.12/day)
Location
Riga
System Name Pukeko
Processor Ryzen 5 3600
Motherboard MSI B450 Gaming Plus Max
Cooling Hyper 212 Black Edition
Memory Corsair Vengeance LPX 16GB 3000MHz DDR4 CL15
Video Card(s) Asus RX 5600 XT TUF Gaming X3 OC
Storage XPG SX8200 Pro 256GB, Crucial MX500 1TB
Display(s) 2x ASUS TUF Gaming VG249Q
Case NZXT, H510i, Matte Black/Red, Tempered Glass
Audio Device(s) TUF Gaming H3
Power Supply Seasonic PRIME Ultra 550W Gold
Mouse Touchpad + Logitech MX518
Keyboard Cooler Master, CK 350, Outemu Red
Software Windows 10
Benchmark Scores 7,42,69 and 666
The thing with Pascal is that - it's old. (Is there a user friendly IDE?) True, I've almost completely forgotten Pascal - Java is my daily driver and C++ is my tinkering language.
 
Joined
Dec 9, 2013
Messages
911 (0.24/day)
System Name BlueKnight
Processor Intel Celeron G1610 @ 2.60GHz
Motherboard Gigabyte GA-H61M-S2PH (rev. 1.0)
Memory 1x 4GB DDR3 @ 1333MHz (Kingston KVR13N9S8/4)
Video Card(s) Onboard
Storage 1x 160GB (Western Digital WD1600AAJS-75M0A0)
Display(s) 1x 20" 1600x900 (PHILIPS 200VW9FBJ/78)
Case μATX Case (Generic)
Power Supply 300W (Generic)
Software Debian GNU/Linux 8.7 (jessie)
The thing with Pascal is that - it's old.
C is old, many other languages are old.

The thing is: Some of them are old but they are still in constant and active development, they continue to improve each year and support newer architectures/technologies and being old and under constant development is a very good thing actually. If they were old and development was abandoned they would be considered obsolete already (which didn't happen).
 

Wrigleyvillain

PTFO or GTFO
Joined
Oct 13, 2007
Messages
7,702 (1.28/day)
Location
Chicago
System Name DarkStar
Processor i5 3570K 4.4Ghz
Motherboard Asrock Z77 Extreme 3
Cooling Apogee HD White/XSPC Razer blocks
Memory 8GB Samsung Green 1600
Video Card(s) 2 x GTX 670 4GB
Storage 2 x 120GB Samsung 830
Display(s) 27" QNIX
Case Enthoo Pro
Power Supply Seasonic Platinum 760
Mouse Steelseries Sensei
Keyboard Ducky Pro MX Black
Software Windows 8.1 x64
Check out edX and Coursera. Free actual college courses from the institutions themselves and an excellent structured environment in which to give it a real shot. And if you can't keep up you will at least now know what you need to concentrate more on. For me it's math when it comes to things like this (tried Python).
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
13,147 (2.96/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
I feel the opposite. Most modern high-level languages will handle a lot of things for you. Not that doing a little bit of assembly didn't help me, but I wouldn't say it helped me with much development I did down the road. You can bash it, but Java isn't a bad a place to start. If you're thinking scripting languages, python and ruby aren't bad. You should learn a language that is good at doing whatever you want to be doing. If you're going to be writing drivers or anything that runs at the OS/driver level, then maybe assembly will help understand how you can save a few clock cycles by doing things a particular way in C.

I've been using Clojure recently and I've been enjoying it a lot because it does just about everything I want it to do very well. Granted, it's not you're typical procedural programming language. It is a dialect of LISP, so be prepared to change how you think about data.
 
Joined
Feb 8, 2012
Messages
3,012 (0.68/day)
Location
Zagreb, Croatia
System Name Windows 10 64-bit Core i7 6700
Processor Intel Core i7 6700
Motherboard Asus Z170M-PLUS
Cooling Corsair AIO
Memory 2 x 8 GB Kingston DDR4 2666
Video Card(s) Gigabyte NVIDIA GeForce GTX 1060 6GB
Storage Western Digital Caviar Blue 1 TB, Seagate Baracuda 1 TB
Display(s) Dell P2414H
Case Corsair Carbide Air 540
Audio Device(s) Realtek HD Audio
Power Supply Corsair TX v2 650W
Mouse Steelseries Sensei
Keyboard CM Storm Quickfire Pro, Cherry MX Reds
Software MS Windows 10 Pro 64-bit
C is pretty low to begin with.

Compared to raw Assembly it is pretty high, especially pointers and arrays (for example). Not to mention the "if, else, and, or" and other operators that make multiple/complex comparisons much faster than if coded in raw Assembly.

Frick is right on this one. Compared to assembly, it is not much higher.
Pointers in C simply cannot be different than pointers in assembly, because pointer is a address of a variable and assembly works directly with memory addresses and registers (variables in asm are symbolic). Arrays work the same as in c (offset to memory address of first element) only c has operator [ ].
Flow control instructions (if,else) are not operators. Boolean expressions used within flow control instructions use boolean operators (and, or, ...).
Coding in raw assembly is done by directly embedding asm code in c code and it is done only for some parts of critical sections where compiler cannot be instructed with a flag how to behave properly.
 
Joined
Dec 9, 2013
Messages
911 (0.24/day)
System Name BlueKnight
Processor Intel Celeron G1610 @ 2.60GHz
Motherboard Gigabyte GA-H61M-S2PH (rev. 1.0)
Memory 1x 4GB DDR3 @ 1333MHz (Kingston KVR13N9S8/4)
Video Card(s) Onboard
Storage 1x 160GB (Western Digital WD1600AAJS-75M0A0)
Display(s) 1x 20" 1600x900 (PHILIPS 200VW9FBJ/78)
Case μATX Case (Generic)
Power Supply 300W (Generic)
Software Debian GNU/Linux 8.7 (jessie)
Pointers in C simply cannot be different than pointers in assembly, because pointer is a address of a variable and assembly works directly with memory addresses and registers
I was telling the way it is accessed in code, which is pretty different. And yes, compared to raw assembly it is pretty high level (a fact).

And construction of complex/multiple/nested comparisons in C or other high level language can be done in seconds while in raw assembly will cost you minutes to hours, depending on complexity. And other thing is about data structures, high level languages such as C make access and organization a lot faster.

This is not even close to assembly level, please.
 
Joined
Feb 8, 2012
Messages
3,012 (0.68/day)
Location
Zagreb, Croatia
System Name Windows 10 64-bit Core i7 6700
Processor Intel Core i7 6700
Motherboard Asus Z170M-PLUS
Cooling Corsair AIO
Memory 2 x 8 GB Kingston DDR4 2666
Video Card(s) Gigabyte NVIDIA GeForce GTX 1060 6GB
Storage Western Digital Caviar Blue 1 TB, Seagate Baracuda 1 TB
Display(s) Dell P2414H
Case Corsair Carbide Air 540
Audio Device(s) Realtek HD Audio
Power Supply Corsair TX v2 650W
Mouse Steelseries Sensei
Keyboard CM Storm Quickfire Pro, Cherry MX Reds
Software MS Windows 10 Pro 64-bit
I was telling the way it is accessed in code, which is pretty different. And yes, compared to raw assembly it is pretty high level (a fact).

And construction of complex/multiple/nested comparisons in C or other high level language can be done in seconds while in raw assembly will cost you minutes to hours, depending on complexity. And other thing is about data structures, high level languages such as C make access and organization a lot faster.

This is not even close to assembly level, please.

Of course C is a high level language ... is it as low as you can go with high level languages? Yes.

Does anyone write comparisons in asm? No. Data stucturs in asm? No, they use C. Asm get embeded in c code for some parts of a critical section. Just as I already said.

My point? Compilers are so great that you don't magically gain speed simply by doing everything in raw assembler, optimizing using powers of a human brain.

EDIT:

Actually I misread this
... make multiple/complex comparisons much faster than if coded in raw Assembly.
as this
... make multiple/complex comparisons much faster when coded in raw Assembly.
so we are kind of making a same point
 
Last edited:
Joined
Dec 9, 2013
Messages
911 (0.24/day)
System Name BlueKnight
Processor Intel Celeron G1610 @ 2.60GHz
Motherboard Gigabyte GA-H61M-S2PH (rev. 1.0)
Memory 1x 4GB DDR3 @ 1333MHz (Kingston KVR13N9S8/4)
Video Card(s) Onboard
Storage 1x 160GB (Western Digital WD1600AAJS-75M0A0)
Display(s) 1x 20" 1600x900 (PHILIPS 200VW9FBJ/78)
Case μATX Case (Generic)
Power Supply 300W (Generic)
Software Debian GNU/Linux 8.7 (jessie)
Does anyone write comparisons in asm?
Data stucturs in asm?
Yes, me! Not while using a high level language but when coding a program or specific function in assembly (using an assembler).

As I do not work professionally in this field I can choose any tool/language that I need/want. And that's what makes me happy! :D

Of course, coding an entire program in Assembly for competition is out of question nowadays... Not impossible, but you know time is money.

Happy New Year!
 
Joined
Feb 8, 2012
Messages
3,012 (0.68/day)
Location
Zagreb, Croatia
System Name Windows 10 64-bit Core i7 6700
Processor Intel Core i7 6700
Motherboard Asus Z170M-PLUS
Cooling Corsair AIO
Memory 2 x 8 GB Kingston DDR4 2666
Video Card(s) Gigabyte NVIDIA GeForce GTX 1060 6GB
Storage Western Digital Caviar Blue 1 TB, Seagate Baracuda 1 TB
Display(s) Dell P2414H
Case Corsair Carbide Air 540
Audio Device(s) Realtek HD Audio
Power Supply Corsair TX v2 650W
Mouse Steelseries Sensei
Keyboard CM Storm Quickfire Pro, Cherry MX Reds
Software MS Windows 10 Pro 64-bit
Happy New Year!

lulz, happy new year to you too

Of course, coding an entire program in Assembly for competition is out of question nowadays... Not impossible, but you know time is money.

Imagine what would it be like ... managing call stack manually and saving registers every time you call a function ... I'd go insane ... I mean more insane
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
13,147 (2.96/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
lulz, happy new year to you too



Imagine what would it be like ... managing call stack manually and saving registers every time you call a function ... I'd go insane ... I mean more insane

A number of CPUs have instructions that handle pushing the state of the registers to the stack and popping them off when you call and return from a sub-routine. When you start writing the application you need to define where in memory the stack begins, but beyond that, the CPU handles a number of things like that at the hardware level. It depends on the architecture though. A good example is if the stack pointer isn't in the same place when you return from the sub-routine as when you started it, you'll be in trouble, also if you alter deeper contents of the stack.
 
Top