- 0
[C/C++] What is the quickest/most efficient way to clear an array?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
By Brandon H · Posted
It makes more sense when you realize this is for the handhelds, and the Xbox app is likely what's going to control/activate the "Xbox full-screen experience" that disables unneeded desktop services and such. -
By +sphbecker · Posted
I'm not against the idea...it just isn't going to work. We are already dealing with multiple launcher issues, between game stores like Steam and games that require their own launcher. There is no way adding a 3rd layer makes it better for anyone. Now IF game studios universally moved away from their own proprietary launchers in favor of a universal launcher like this, that might be cool, but even if the launcher is fully capable of providing all the features they want (which I highly doubt), then I still doubt companies would choose it over their software...we all know companies want to run as much software as possible on our computers, and something like a launch that has an excuse the run in the background for reasons, even better. -
By hagjohn · Posted
I was going to say that search engines and such, have been scraping everyone's copyright, IP and data, since the beginning of the internet. -
By LoneWolfSL · Posted
Microsoft is officially making the Xbox app on PC a universal launcher by Pulasthi Ariyasinghe It was earlier this year that an image mockup from Microsoft showed the Xbox app on PC with an interesting change: including support for other PC stores on the app, teasing that it may be becoming a universal launcher like GOG Galaxy or Playnite. Considering the company's new handheld initiative that will house a brand-new gaming-focused version of Windows, it was clear that this feature was on the way. And now, Xbox Insiders have access. Announced today as the 'aggregated gaming library' feature, it's poised to land this holiday on the ROG Xbox Ally and ROG Xbox Ally X to easily manage all their installed games from a single place. But before that, Xbox Insiders on PC can have a crack at it to see how it functions and provide feedback to Microsoft. In its current state, Microsoft says that the feature now supports Xbox, Game Pass, Battle.net, and "other leading PC storefronts," all handled via the Xbox PC app. The company did not detail what these other storefronts are, but Steam, Epic Games Store, Ubisoft Connect, and EA Play apps seem likely candidates. "Whether you’re on a Windows PC or a handheld device, your Xbox library, hundreds of Game Pass titles, and all your installed games from leading PC storefronts will now be at your fingertips," said the company. When a game from a supported store is installed on a PC, Insiders should now see it appear on the Xbox app in the My Library and Most Recent sections for easy access. "And this is just the beginning," adds Microsoft. "We’ll continue rolling out support for additional PC storefronts over time." Insiders can also disable this functionality and hide games from specific stores if needed from the Settings > Library & Extensions menu. Anyone interested in testing out the new 'aggregated gaming library' update can use the Xbox Insider app on PC to enroll in the ongoing Insider Previews. -
By TarasBuria · Posted
Get this powerful mini PC with Core Ultra 9, 32GB RAM, and 1TB SSD for just $799 by Taras Buria The ASUS NUC 14 Pro+ is a powerful mini PC with capable hardware, and right now, you can get it on Amazon with a big discount. At just $799, this computer offers a Core Ultra 9 processor, 32GB of memory, and a 1TB SSD. The NUC 14 Pro+ features a low-profile aluminum chassis, which can be opened without removing rubber feet or undoing any screws. Its toolless design lets you access the storage without a screwdriver. The computer also has a rich set of ports. On the front side, you will find two USB 3.2 Gen 2 Type-C, one USB 3.2 Gen 2x2 Type-C, and a power button. Unlike the Mac mini, which has a frustrating power button placement, the power button in the NUC 14 Pro+ is located where it should be. The back of the NUC 14 Pro+ has a DC-in port, two Thunderbolt 4 ports, one 2.5G Ethernet port, one USB 3.2 Gen2 Type-A, one USB 2.0 Type-A, two HDMI 2.1, and a Kensington lock. Finally, there is a VESA mount, which lets you place the device on the back of your monitor for a cleaner desk. The computer is powered by Intel's 14th-gen Core Ultra 9 185H processor, 32GB of DDR5 memory, and a 1TB PCIe Gen4 NVMe SSD. Windows 11 Home is preinstalled, so you do not need to bring your own drive, memory, or Windows 11 license. ASUS NUC 14 Pro+ Core Ultra 9 185H, 32GB RAM, 1TB SSD - $799.99 | 27% off on Amazon US This Amazon deal is US-specific and not available in other regions unless specified. If you don't like it or want to look at more options, check out the Amazon US deals page here. Get Prime (SNAP), Prime Video, Audible Plus or Kindle / Music Unlimited. Free for 30 days. As an Amazon Associate, we earn from qualifying purchases.
-
-
Recent Achievements
-
fredss earned a badge
Week One Done
-
fabioc earned a badge
Dedicated
-
GoForma earned a badge
One Month Later
-
GoForma earned a badge
Week One Done
-
ravenmanNE earned a badge
Week One Done
-
-
Popular Contributors
-
Tell a friend
Question
A4B4
So far I've been using:
memset(myarray, 0, sizeof(myarray));
Most of the time, myarray is just a character array, so I fill it full of null characters. However, is there a better way to do this? (It almost seems this is more suited to clearing structures or objects.)
Should I be using a string function? Or, should I use strlen() instead of sizeof()?
Or, at the very least is memset any more or any less efficient that a standard for loop to clear an array? I ask this because I might want to set myarray to a value other than null within the program.
Thanks in advance!
Edit: And yes, performance is quite important for my application.
Link to comment
https://www.neowin.net/forum/topic/624316-cc-what-is-the-quickestmost-efficient-way-to-clear-an-array/Share on other sites
10 answers to this question
Recommended Posts