Hacker Newsnew | past | comments | ask | show | jobs | submit | deletes's commentslogin

It reckons the speedy charging battery technology could be on the market within three years.

According to this chart it really works: https://xkcd.com/678/


Of course that doesn't apply to games anymore but to high performance computing. Systems for gaming vary too much for that to be of any importance. Maybe if you are doing it for the consoles, but then you have to optimize each individually.


I was curious about this as I have never done any such testing, so I wrote a simple c program.

The object was a struct with a size of a typical game object( 100B ), then I trashed the memory by doing a lot of malloc/free using the size of the object. The two tests were one with an array of objects( contiguous array ) and the other an array of pointers to objects which were allocated separately. Then I iterated over the object doing some very simple operation( just enough to access it, and identical for each object ) and timed this. And of course I trashed the memory some more for each time.

The time taken ratio is:

array of objects : array of pointers to objects

1 : 1.189

The second test is identical except I made some extra effort to make sure that every object in array of pointers was not adjacent to any previous one in memory:

array of objects : array of pointers to objects

1 : 2.483

The difference got much smaller once the operation on each object became more time consuming.


Frames per seconds is better in almost every way. When you use it to watch movies it is better since a normal human understands seconds but not what a frame is. In gaming, frame times usually vary quite a lot, and the average, which is fps, is the important part.


When doing real-time graphics and looking at a profiler, it does help to know that you want to have less than 16 ms of calculations per frame. But agreed, in most other respects fps is nicer.


Doesn't run correctly under windows. The code relies on the system call "stty cbreak", which is linux specific.

'stty' is not recognized as an internal or external command, operable program or batch file.

I would love to read comments instead of downvotes. Where am I wrong?


`stty` is not Linux specific, it's common to all Unix-derived systems (including Mac OS X, for example). Windows is not Unix-derived.


HN got really trigger happy in the last few weeks.

That part of the comment only is partially correct, and not was even the main point of my comment; what I really meant was that it doesn't belong in windows, and the main point was that the code is not portable.


A reaction to the new moderation proposals, maybe?


Were you expecting WINAPI wMainMain(...)?


As an obfuscated c example I was expecting portable code. Anyone hoping that as many people as possible try their code should aim for that.


Obfuscated C is always with caveats. The fact that it uses terminal escapes and stty suggests its not going to work on anything other than a colour xterm, if you're lucky, there are no sunspots and the wind is blowing in the correct direction...


I'm not sure that's a common goal for obfuscated c code


Same here. stty is available through cygwin, although I didn't result in a playable game.


right click >> Properties >> Disable metro

I hope there is an obscure setting somewhere that would disable metro completely. As a programmer I see no benefit to it.


The strangest outcome of all of this is that Bill O'Reilly's actually made some sense for the first time in history.

http://youtu.be/Pt0ot1LgXZQ?t=1m3s


Its really telling of the greater divide in the republican party. In the past fox used to play up some of the more crazy beliefs from "that" segment of the party. It was useful to them, and didn't really alienate the other half. However they lost control, and its hurting their image. So now I believe the more traditional components of the party are attempting to return to a moderate position.

That in combination with the fact that global warming is real, with a certainty of something like 95%, and is costing the insurance companies (major contributors) big money.


April Fool's day !


This is why I don't like April F. Everything has to be rechecked/researched x times. The 60 minutes article is definitely not AF and I doubt my link is also.


Seriously, what are they waiting for. I'm not a teenager anymore, but If this was a serious app I would totally go catch a few, granted as a joke. And kids would go crazy over this, every single one already has the pokedex( smartphone ), that basically has all required capabilities.


Comment on the blog that got deleted:

I did a similar test in C and have gotten very similar results. When N is around 4000 the trashing version starts to differ substantially. A 3x difference can already be seen when N is 1000.

This means if your program is running on two threads over different parts of the matrix, every single iteration requires a request to RAM.

I'm skeptical over this part, I have tried to replicate this behavior but was unsuccessful. Even though cores are sharing L3, I doubt that a thread will overwrite the entire cache on every iteration.


Author here, I have to manually approve comments, and did not delete this one (way too much spam not to do so), sorry. Different compilers and architecture will have different results, I explained that in a previous post.

Either way, you should see a noticeable difference as the size increases, which was the point.


You don't know that, they might as well changed their opinion and are now too embarrassed to speak about it.

I think a lot of people were acting with pure emotion. Once the surprise subsides the logical reasoning kicks in and you get the bigger picture.


they might as well changed their opinion and are now too embarrassed to speak about it.

Do people do this? It seems like people who change their opinion are also vocal about it.


Note the phrase might as well. The example was a stab at how you can't make such assumptions.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: