It's a nice idea, but I imagine the audience for this will be much smaller than that for kernel traffic and it's ilk. Compilers are complicated beasts. I'd say even more complicated than an operating system kernel. While I can understand a good deal of what goes on with lkml, with GCC I'm pretty much lost.
It's neither a bug, nor is a feature. It's a difference, and possibly a testing methodology flaw.
The theory behind garbage collection isn't just that it allows the programmer to avoid the effort of watching when to delete things. It's that garbage collection can actually improve performance on certain workloads.
And on certain workloads it can decrease performance. Coders that know their languages should recognise the difference between the two memory allocation methods, and adjust their code accordingly. I seriously doubt you'd claim that java's garbage collector is always faster than manual memory management.
Forcing a garbage collection for every delete is completely unfair, since it does a full scan of memory, as opposed to just twiddling bits to free a single data value.
Perhaps, but it's also unfair to have a 'benchmark' that always pays the penalty of C++ memory allocation and deallocation, but never pays the penalty of Java memory allocation and deallocation.
There's no memory leak for these benchmarks... both C++ and Java free all memory used when the process exits. Perhaps you'd prefer a longer-running test with lot of garbage generation (forcing gc to run at some point).
Just because the memory is freed back to the system after termination doesn't mean it isn't a memory leak. It's a bad practice to allocation memory and not free it when you're writing C or C++ code. A longer running process would probably be more fair, or even a garbage collect at the end of execution. After all, on 'real' programs, a garbage collection is quite likely.
Not only that, but the 'fast path' in these otherwise identical functions is completely different. It means the C code may or may not be following more JMPs to get to the more common case. I have not read the code, but I would imagine the Java runtime could detect the more common path and optimize for it, but the C code is fixed in one direction. Maybe it optimizes it for C++, maybe it penalizes C++. Without taking a good look at the source, I can not say.
Now, the other question is why use the ? operator at all? It's no faster than an if statement in a case like this. This code fragment would be much easier to read, for example:
(Please imagine it's indented properly because slashdot's ecode likes to strip spaces)
The other benefit to this code is it should be clear to even the worst optimizer what it can optimize and what it can't.
Re:Can I have an infinite budget to write the code
on
Java Faster Than C++?
·
· Score: 1
Just because Athena/Xlib sucks doesn't mean AWT and Swing don't suck. If you want a toolkit for C++, then both WxWindows and Qt are wonderfully modern toolkits that are easy to write for. If you want Java toolkits, hopefully you skip AWT and Swing and target IBM's SWT instead. GUI toolkit is a really poor reason to choose Java. Choosing Java because you want the protection from buffer overflows, pointer corruption, and other common C programming mistakes is a good reason.
Because most of the schemes that have been thought up implys centralized control in some way shape or form. Microsoft wants to collect a fee for each e-mail sent. "That'll stop spammers!" they say, and it will, but it'll also stop all the casual e-mail that goes around, too. Other people want to maintain lists of authorized mail servers. Except they're only effective as soon as everyone's on board, and some of the schemes are just plain loony. I publish SPF records at my site, but it doesn't help when I can't really make use of SPF records on remote hosts because they're too rare.
DirectTV got settlements in these cases because it was generally more expensive to go to trial with a lawyer than it is to settle (after lost wages, lawyer fees, expenses).
This is actually a different feature. This lets you ctrl-click or middle click and open something in a new tab without changing tabs. Redirecting target=_blank to a new tab isn't natively supported by Firefox right now (I think Mozilla itself might, though).
BTW: You can change the setting in the option screen in Advanced -> Browsing -> Open links in the background
Yes, but it doesn't auto-authenticate via NTLM with your currently logged in credentials as IE does. One could argue that IE's implementation is a security flaw, as it means you're sending your username (which may include organization name, location, etc), and password hash to any remote site that asks for authentication.
It's easy enough for you to test. Switch to fbdev or pass the Option "NoAccel" (if supported), and your graphics card becomes nothing more than a dumb framebuffer.
I think you'll find out rather quickly that it isn't very nice to work with. There's a very good reason for accelerating on the card. A quick list of what the graphics card can do faster than the CPU:
bitmap block transfers - The video card has much faster access to framebuffer because it doesn't have to go through the bus to get to it. It also means less interferance with other devices that may be stuck on the same bus and/or bridge as the video card.
Hardware cursors - The video card can move a hardware cursor around on the screen without the need to transfer the data the cursor is going to obscure back to the PC's main memory. It's a small cost, but it adds up quickly. It can be the difference between a silky smooth mouse movement, and one that is a bit jerky.
Video playback - Even at 2.xGHz, a PC CPU is still slow at resizing and colorspace converting a video stream. To do a video playback at 1600x1200, you need at least 220MB/s of bandwidth, and that doesn't even include double or triple buffering, trying to sync to vertical refresh, the actual video decompression or even sending audio data to the sound card. All modern video cards support a video overlay capability where you paint the target area with one color, program the card to display the overlay over the painted area, and then start uploading your unscaled video data to part of the video card's memory. The card takes care of colourspace conversion (if needed), scaling and sometimes even filtering.
Anything where memory would need to be transfered twice - Any operation where you'd need to transfer the memory out of the video card, work on it, and then transfer it back is worth accelerating in the video card itself. AGP 4x might be able to do about 1 GB/s to/from the video card, but the video card can do much more to/from it's own memory (the GeForce FX 5700+ cards can do a whopping 30GB/s, but even value models can do between 4-6GB/s).
He could also either formally refuse to vote (as suggested by another poster), or spoil his ballot if he feels all the candidates are not worth voting for. Either one sends a clearer message. Voting Rhino (back when they existed) was a slap in the face of the other major parties, especially when, despite not winning, still managed to get more votes than the other two major parties that were in the election.
I think this is a communication problem in two ways. First is the fact that the traditional communcation methods between candidate and voter aren't as effective with young voters as they are with older ones. I don't find political advertising particularily compelling, nor am I attracted to the cookie cutter promises of each party's platform. I can visit their content free websites and marvel at the complete lack of information. This story is the perfect example of information I'd like to see, but do I want to spend time contacting each candidate that I might consider voting for?
I would love to see the parties use webboards and/or blogs, however this brings me to the other problem. The media loves to dig up dirt on any party, and this would just be a mass invitation to chaos. On the other hand, I would love to read a blog from my MP that details exactly what he's doing, but it would have to be an activity where he would not be punished by his party for saying things counter to the party line. A blog that was screened by the party would be no different than those stupid feel-good mailouts MPs seem to like to send to their constituents. I want to know the bad with the good, and I want to feel that my input would be welcomed even if it's not used.
There's a certain perception that MPs really don't do anything in Ottawa except bicker in the House of Commons. Feel-good pamphlets don't really change that perception, either.
The most effective forms of copy protection I've seen are for online play, where you need a valid, issued CD key to play. People who pirate the game can only play single player, or LAN. Everyone else can play anywhere they choose.
Good games are worth buying. Bad games are rarely worth the CD-R you might burn it on.
Wouldn't want to be SCO in this position. Either you try to continue the current lawsuit against Novell despite the fact the judge is already saying that the chances are not good, or they drop the lawsuit, and risk the Autozone, DC and Red Hat lawsuits and several of their claims in the IBM lawsuit coming to a very abrupt and very bad (for SCO) end. They might be able to prevail against Novell with a plain breach of contract claim since the ammendment says that Novell will transfer any copyrights that are required for exercising their UNIX business, but I wouldn't hold my breath on that either. After all, it's been eight years since they signed that one, and they haven't needed them until now, and only after selling the business to yet another company?
That's funny. I've always considered myself centre 'leaning'. I don't like extremists on either side of the political spectrum. I think both left and right wing ideologies have good ideas, and bad ideas. The right wing has a bad tendancy to get a little too cozy with their corporate buddies, whereas the left wing seems to believe that everything under the sun deserves public funding.
Then again, I'm Canadian, and even though I usually vote for the Tories, you'd probably think I'm voting for a left wing party because the political spectrum is aligned differently here. I doubt I can bring myself to vote Tory in this election because the new Conservative party is a bit too extremist for me, though. I prefer my conservatives conservative, not neoconservative. Neocons are way too extreme in my book.
UT2k3/4 alt-tabs very slowly, since it seems to evict nearly all of Windows from memory in order to run. Half-Life used to kill the sound when you switched from it (been ages since I used HL since I've vowed not to play CounterStrike -- IT'S TOO OLD!!!). I think I remember the MMORPG Earth and Beyond crashing after a couple switches.
I think things have become better since games started being designed to work properly on Windows 2000/XP. Back in the Win95/98 days, it was unusual to have a game that could survive alt-tab.
Or more to the point: Atrocity is what terrorists do. No one is surprised when a terrorist group uses it's nefarious means to progress their cause. We treat these people to our disgust, not our outrage. The U.S. Military, on the other hand, we assume is not supposed to commit these horrible acts. When they do, it's a shock, and expressing outrage is natural.
The google search term you're looking for is 'moonbat'. This is what the extreme right wing supporters call their critics. I don't know of an equivalent term from the liberal camp. I guess calling their critics "Conservatives" is insult enough for them.
Given that, there are a number of ways to secure games from that class of attacks, the simplest with current technology being PunkBuster.
PunkBuster is just an arms race against the cheaters. It's just a database of known cheats, and nothing more. A cheater that just snoops on the memory of the game, and then sends the appropriate I/O to the game to aim appropriately would be undetectable to the game itself, and without a signature in PunkBuster, to it as well. A cheater implemented as a kernel driver might even be undetectable to something like PunkBuster.
If there is grass everywhere blowing in the wind, and insects flying around, and birds, etc, and there is no difference in the in-memory data structures between a bird and a player, then anyone who kills every bird in thier LOS in twitch-time is obviously using an aimbot.
Not really possible. If there's no in-memory difference, then the game can't possibly know how to render it on-screen, either. The only way this would work is if you were doing server-side rendering, and that's only appropriate for a very limited number of games (not FPS, for example).
Anything the game developer can design as a counter-measure, the cheaters can counter, and in usually far less time than the counter-measure took to design. Signature databases, like PunkBuster, are the first and last line of defense against cheaters. And it's not a very good line of defense, either.
Frankly, I'd probably find Florida, Arizona, or California too hot. But, I'm from Manitoba, where the average summer high is about 80 degrees (highest on record is 105) with about 80% relative humidity at 6:00 AM, and drops to a bit over 50% at 3:00 PM. Add to that temps that can get as low as -40 degrees in winter, and this might seem like hell to you. But if you grew up in this, you start to miss it when you're away from it.
One thing you'd miss in those other places would be the variance of the seasons. The same place can look quite different here in winter as compared to summer, or even spring and fall. In those southern states, there's two seasons -- warm, and less warm. In New York, you get dreary/rainy instead thanks to the Great Lakes.
A game can never be secure against aimbots and other automation techniques. The only way to make it secure would be to enforce it via hardware (TCPA, Palladium, etc). Aimbots don't alter the game like hacking yourself invisible or invulnerable would, but only change your reactions from being as accurate as your eye, and as fast as your reflexes, to as accurate as the machine, and as fast as the machine.
It's a nice idea, but I imagine the audience for this will be much smaller than that for kernel traffic and it's ilk. Compilers are complicated beasts. I'd say even more complicated than an operating system kernel. While I can understand a good deal of what goes on with lkml, with GCC I'm pretty much lost.
It's neither a bug, nor is a feature. It's a difference, and possibly a testing methodology flaw.
And on certain workloads it can decrease performance. Coders that know their languages should recognise the difference between the two memory allocation methods, and adjust their code accordingly. I seriously doubt you'd claim that java's garbage collector is always faster than manual memory management.
Perhaps, but it's also unfair to have a 'benchmark' that always pays the penalty of C++ memory allocation and deallocation, but never pays the penalty of Java memory allocation and deallocation.
Just because the memory is freed back to the system after termination doesn't mean it isn't a memory leak. It's a bad practice to allocation memory and not free it when you're writing C or C++ code. A longer running process would probably be more fair, or even a garbage collect at the end of execution. After all, on 'real' programs, a garbage collection is quite likely.
Now, the other question is why use the ? operator at all? It's no faster than an if statement in a case like this. This code fragment would be much easier to read, for example:
if (m == 0)
return (n + 1);
else if (n == 0)
return Ack(m - 1, 1);
else
return Ack(m-1, Ack(m, n-1));
(Please imagine it's indented properly because slashdot's ecode likes to strip spaces)
The other benefit to this code is it should be clear to even the worst optimizer what it can optimize and what it can't.
Just because Athena/Xlib sucks doesn't mean AWT and Swing don't suck. If you want a toolkit for C++, then both WxWindows and Qt are wonderfully modern toolkits that are easy to write for. If you want Java toolkits, hopefully you skip AWT and Swing and target IBM's SWT instead. GUI toolkit is a really poor reason to choose Java. Choosing Java because you want the protection from buffer overflows, pointer corruption, and other common C programming mistakes is a good reason.
Because most of the schemes that have been thought up implys centralized control in some way shape or form. Microsoft wants to collect a fee for each e-mail sent. "That'll stop spammers!" they say, and it will, but it'll also stop all the casual e-mail that goes around, too. Other people want to maintain lists of authorized mail servers. Except they're only effective as soon as everyone's on board, and some of the schemes are just plain loony. I publish SPF records at my site, but it doesn't help when I can't really make use of SPF records on remote hosts because they're too rare.
DirectTV got settlements in these cases because it was generally more expensive to go to trial with a lawyer than it is to settle (after lost wages, lawyer fees, expenses).
Of course you're innocent until proven guilty. In a criminal court of law, that is. In a civil lawsuit, more likely than not is usually good enough.
BTW: You can change the setting in the option screen in Advanced -> Browsing -> Open links in the background
Yes, but it doesn't auto-authenticate via NTLM with your currently logged in credentials as IE does. One could argue that IE's implementation is a security flaw, as it means you're sending your username (which may include organization name, location, etc), and password hash to any remote site that asks for authentication.
I think you'll find out rather quickly that it isn't very nice to work with. There's a very good reason for accelerating on the card. A quick list of what the graphics card can do faster than the CPU:
He could also either formally refuse to vote (as suggested by another poster), or spoil his ballot if he feels all the candidates are not worth voting for. Either one sends a clearer message. Voting Rhino (back when they existed) was a slap in the face of the other major parties, especially when, despite not winning, still managed to get more votes than the other two major parties that were in the election.
I would love to see the parties use webboards and/or blogs, however this brings me to the other problem. The media loves to dig up dirt on any party, and this would just be a mass invitation to chaos. On the other hand, I would love to read a blog from my MP that details exactly what he's doing, but it would have to be an activity where he would not be punished by his party for saying things counter to the party line. A blog that was screened by the party would be no different than those stupid feel-good mailouts MPs seem to like to send to their constituents. I want to know the bad with the good, and I want to feel that my input would be welcomed even if it's not used.
There's a certain perception that MPs really don't do anything in Ottawa except bicker in the House of Commons. Feel-good pamphlets don't really change that perception, either.
Good games are worth buying. Bad games are rarely worth the CD-R you might burn it on.
Wouldn't want to be SCO in this position. Either you try to continue the current lawsuit against Novell despite the fact the judge is already saying that the chances are not good, or they drop the lawsuit, and risk the Autozone, DC and Red Hat lawsuits and several of their claims in the IBM lawsuit coming to a very abrupt and very bad (for SCO) end. They might be able to prevail against Novell with a plain breach of contract claim since the ammendment says that Novell will transfer any copyrights that are required for exercising their UNIX business, but I wouldn't hold my breath on that either. After all, it's been eight years since they signed that one, and they haven't needed them until now, and only after selling the business to yet another company?
Then again, I'm Canadian, and even though I usually vote for the Tories, you'd probably think I'm voting for a left wing party because the political spectrum is aligned differently here. I doubt I can bring myself to vote Tory in this election because the new Conservative party is a bit too extremist for me, though. I prefer my conservatives conservative, not neoconservative. Neocons are way too extreme in my book.
huh? My comment was neither a troll nor was it particularily insightful. Moderators are confusing.
I think things have become better since games started being designed to work properly on Windows 2000/XP. Back in the Win95/98 days, it was unusual to have a game that could survive alt-tab.
Or more to the point: Atrocity is what terrorists do. No one is surprised when a terrorist group uses it's nefarious means to progress their cause. We treat these people to our disgust, not our outrage. The U.S. Military, on the other hand, we assume is not supposed to commit these horrible acts. When they do, it's a shock, and expressing outrage is natural.
Let's hope the police do, too.
But why, oh why, are lunatics at the helm of both of the US's major political parties? :-/
The google search term you're looking for is 'moonbat'. This is what the extreme right wing supporters call their critics. I don't know of an equivalent term from the liberal camp. I guess calling their critics "Conservatives" is insult enough for them.
Anything the game developer can design as a counter-measure, the cheaters can counter, and in usually far less time than the counter-measure took to design. Signature databases, like PunkBuster, are the first and last line of defense against cheaters. And it's not a very good line of defense, either.
One thing you'd miss in those other places would be the variance of the seasons. The same place can look quite different here in winter as compared to summer, or even spring and fall. In those southern states, there's two seasons -- warm, and less warm. In New York, you get dreary/rainy instead thanks to the Great Lakes.
A game can never be secure against aimbots and other automation techniques. The only way to make it secure would be to enforce it via hardware (TCPA, Palladium, etc). Aimbots don't alter the game like hacking yourself invisible or invulnerable would, but only change your reactions from being as accurate as your eye, and as fast as your reflexes, to as accurate as the machine, and as fast as the machine.