Author Topic: My new toy..  (Read 19867 times)

0 Members and 1 Guest are viewing this topic.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
My new toy..
« on: August 22, 2007, 04:18:46 am »
A HP Compaq 6710b Notebook!

Yeah, I know Compaq's aren't really computers at all, but actually a work of the devil, but this is sort of GI (it's my school machine) so I just have to deal with it. It's a pretty decent machine, equipped with 1GB of RAM (in a single slot, so if I feel like dumping $200 into another SODIMM, I can!) and a (IMO, blazing fast) Intel Core 2 Duo 2.00GHz (so, 4GHz?) processor. As soon as I get my everyday things situated on this, I'll probably end up using this as my main machine.

By the way, does anyone know how to kill NetNanny? It told me I wasn't allowed to view the board index because it had mature/adult content.. which doesn't really surprise me. Lol, it's process can be killed and simply disabled in msconfig. WHO WILL PROTECT YOUR CHILDREN NOW, NANNY? MUAHAHAHA. Sorry.
« Last Edit: August 22, 2007, 04:53:47 am by Joe[x86/64] »
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Chavo

  • x86
  • Hero Member
  • *****
  • Posts: 2219
  • no u
    • View Profile
    • Chavoland
Re: My new toy..
« Reply #1 on: August 22, 2007, 08:51:56 am »
Having a dual core processor does not mean you have performance comparable to twice the frequency of a single core.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: My new toy..
« Reply #2 on: August 22, 2007, 09:26:56 am »
According to the commercial for future shop, not only is dual core "way faster than previous generations", they advise you to get "2gb of ram so you can run multiple programs". Have fun running a single program, sucker!

(Note: Future Shop is the Canadian version of Best Buy (and owned by BB, too), and I really hate their commercials.)

Offline chuck

  • Full Member
  • ***
  • Posts: 335
  • Canadian Biathlete
    • View Profile
    • Chucks Blog
Re: My new toy..
« Reply #3 on: August 22, 2007, 12:36:18 pm »
According to the commercial for future shop, not only is dual core "way faster than previous generations", they advise you to get "2gb of ram so you can run multiple programs". Have fun running a single program, sucker!

(Note: Future Shop is the Canadian version of Best Buy (and owned by BB, too), and I really hate their commercials.)
Future Shop is also overpriced... CompuSmart was alot better than them till they stopped doing retail. :(
Chucks Blog
JavaOp2 Plugins

Quote
Error, keyboard not connected. Press F1 to continue.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: My new toy..
« Reply #4 on: August 22, 2007, 09:03:29 pm »
Having a dual core processor does not mean you have performance comparable to twice the frequency of a single core.

I'm sort of having difficulty understanding exactly what is what. I know that a single thread only runs on a single core, but if I'm using multiple programs (say, I'm converting WMA to MP3 in one programming and browsing the web in another), the programs will be split between the two cores doubling the possible workload that it can handle, correct?
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Chavo

  • x86
  • Hero Member
  • *****
  • Posts: 2219
  • no u
    • View Profile
    • Chavoland
Re: My new toy..
« Reply #5 on: August 22, 2007, 09:14:02 pm »
In theory, the effective speed is comparable to double a single cores speed (~190-195% max efficiency even in theory) but that requires the programs running on the processor to support the dual core ISA.  If you know how HyperThreading works, you know that only programs designed to take advantage of it benefit.  If you want to know more, I can probably find something online or recommend a couple books regarding computer architecture. 

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: My new toy..
« Reply #6 on: August 23, 2007, 02:40:34 am »
That'd be cool! I'm sort of interested in both sides of the concept (the user side and programmer's side) since I plan on using this machine for development as well.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Chavo

  • x86
  • Hero Member
  • *****
  • Posts: 2219
  • no u
    • View Profile
    • Chavoland
Re: My new toy..
« Reply #7 on: August 23, 2007, 11:43:39 am »
You can start with wikipedia: http://en.wikipedia.org/wiki/Multi-core_%28computing%29
and: http://en.wikipedia.org/wiki/Parallel_computing

Most of the links aren't that great though, I'll look through my books when I get home and see if any are entry level enough.
« Last Edit: August 23, 2007, 11:45:13 am by unTactical »

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: My new toy..
« Reply #8 on: August 29, 2007, 04:41:55 am »
In theory, the effective speed is comparable to double a single cores speed (~190-195% max efficiency even in theory) but that requires the programs running on the processor to support the dual core ISA.  If you know how HyperThreading works, you know that only programs designed to take advantage of it benefit.  If you want to know more, I can probably find something online or recommend a couple books regarding computer architecture. 

A book such as Windows Internals might also be worthwhile.  It is of course more specific to Windows programming, but it is enlightening nonetheless.

In Windows, the scheduler assigns processor time on a per-processor, per-thread basis.  Threads are not assigned priority based on a process, unless the process or thread has been given process affinity.

By saying that a program must be designed to take advantage of hyperthreading or dual-core systems, for Windows specifically, that means that you'd only need to create multiple threads in order to take advantage of these kinds of benefits.

Cool, huh? :)
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Chavo

  • x86
  • Hero Member
  • *****
  • Posts: 2219
  • no u
    • View Profile
    • Chavoland
Re: My new toy..
« Reply #9 on: August 29, 2007, 12:59:05 pm »
That's not completely accurate :)  The OS definately has the job of optimizing multithreading, especially with multiple processors/cores (Parallelism).  However, there is significant optimization that has to be done at the instruction set level.  The OS can't do anything about this ;)  I don't know of any OS that will actually modify the binary executable to use new or optimized instructions.  That would be pretty cool though.  I suppose the trade-off in run-time optimization might not produce a net benefit though.

The comparison is similar in principle to 64bit application development compared to 32bit applications.  The OS has to first support the extended instruction set and the application has to take advantage of the larger field sizes where applicable as well.

It's very difficult to show this with benchmarks because so much of the time doing a given task is spent accessing memory, transferring data to/from secondary memory, etc.  Of course, that just shows the diminishing returns of the current PC architecture.
« Last Edit: August 29, 2007, 01:07:19 pm by unTactical »

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: My new toy..
« Reply #10 on: August 29, 2007, 04:18:57 pm »
However, there is significant optimization that has to be done at the instruction set level.

It depends on what you're talking about.

If you're talking about whether two threads can run in parallel, no additional coding is required to achieve this in a Windows program, short of creating and starting a new thread.

If you're talking about whether two threads can manipulate and perform calculations on the same series of data in parallel, well then you're right.  You run into problems such as concurrency.  You also frequently see problems with making sure that instructions can be executed out-of-order and achieve the same result.  But this isn't the same as what I said about dual-core/multi-core systems programming in a Windows environment. :P
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Chavo

  • x86
  • Hero Member
  • *****
  • Posts: 2219
  • no u
    • View Profile
    • Chavoland
Re: My new toy..
« Reply #11 on: August 29, 2007, 04:54:25 pm »
My point was that Parallelism is only one piece of the 'advantages of multiple cores' pie.

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: My new toy..
« Reply #12 on: September 04, 2007, 03:20:34 pm »
I started development my bot primarily on a single-core machine. When I got my X2, I realized I was missing quite a bit of synchronization. Fortunately, it's very easy to solve those problems in Java. While it's not impossible for these types of issues to come up in a single-core operating environment, it's less likely by an extremely large factor. Before you dive in, I'd strongly recommend learning about synchronization, in addition to the aforementioned topics.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Newby

  • x86
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: My new toy..
« Reply #13 on: September 04, 2007, 07:53:03 pm »
Whenever I see this topic, I think you bought some sort of sex toy or dildo. :/
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: My new toy..
« Reply #14 on: September 04, 2007, 09:26:52 pm »
Whenever I see this topic, I think you bought some sort of sex toy or dildo. :/

Who doesn't enjoy them??
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: My new toy..
« Reply #15 on: September 04, 2007, 10:52:01 pm »
I started development my bot primarily on a single-core machine. When I got my X2, I realized I was missing quite a bit of synchronization. Fortunately, it's very easy to solve those problems in Java. While it's not impossible for these types of issues to come up in a single-core operating environment, it's less likely by an extremely large factor. Before you dive in, I'd strongly recommend learning about synchronization, in addition to the aforementioned topics.

By synchronization, do you mean methods running synchronously and asynchronously? I've already learned a bunch of that kind of stuff through threading, especially in the ways I work with sockets.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: My new toy..
« Reply #16 on: September 05, 2007, 12:12:04 am »
Talk to GS, he sells fleshlights :D

Offline Chavo

  • x86
  • Hero Member
  • *****
  • Posts: 2219
  • no u
    • View Profile
    • Chavoland
Re: My new toy..
« Reply #17 on: September 05, 2007, 12:27:43 am »
The book I have (An earlier version of this one) is easily beyond your level but you might try this one if you can find it at the library or something:
Optimizing-Applications-Multi-Core-Processors-Performance

I haven't read it but I've seen it lying around and the synopsis seems like you would understand it better.  Be forewarned that it is most likely a very dry read.

edit:
This one looks good too.  Talks more about the hardware side and embedded system (your truly).
Multiprocessor Systems-on-Chips
« Last Edit: September 05, 2007, 12:31:13 am by unTactical »

Offline Killer360

  • Hero Member
  • *****
  • Posts: 752
    • View Profile
Re: My new toy..
« Reply #18 on: September 07, 2007, 12:47:01 pm »
Why the fuck do you have netnanny installed?  :D

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: My new toy..
« Reply #19 on: September 07, 2007, 01:36:24 pm »
Why the fuck do you have netnanny installed?  :D

My school == gay^2, apparently.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: My new toy..
« Reply #20 on: September 07, 2007, 02:01:51 pm »
Your school is ? ;D

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: My new toy..
« Reply #21 on: September 07, 2007, 02:08:25 pm »
« Last Edit: September 07, 2007, 02:17:59 pm by Camel »

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: My new toy..
« Reply #22 on: September 07, 2007, 02:17:33 pm »
Since he used ==, one usually would assume that ^ is the exclusive or operator, which is mathematically expressed with .

Really, though, I'm just giving him a hard time. :P

And, in response to your edit:


Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: My new toy..
« Reply #23 on: September 07, 2007, 03:07:22 pm »
Gay squared, to be precise.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: My new toy..
« Reply #24 on: September 07, 2007, 03:10:55 pm »
Gay squared, to be precise.

Yep, I know, but ^ is pretty ambiguous when you're in a "programming" context. :)

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: My new toy..
« Reply #25 on: September 07, 2007, 03:13:52 pm »
I was ignoring that. :P
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: My new toy..
« Reply #26 on: September 07, 2007, 03:26:29 pm »
I always try to use "**" for exponents, I was taught that in school. But that seems to confuse people even more than "^". :-o

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: My new toy..
« Reply #27 on: September 07, 2007, 06:26:43 pm »
People are stupid :D

** is power, ^ is eXclusive Or

Not difficult to remember :\

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: My new toy..
« Reply #28 on: September 07, 2007, 07:31:38 pm »
I always try to use "**" for exponents, I was taught that in school. But that seems to confuse people even more than "^". :-o

I'd never seen that notation until you mentioned it a while ago.  When writing in an environment where superscripts and subscripts aren't trivially available, I've always copied the notation that calculators use, which is ^.  TeX uses ^ to indicate exponents too. :-\

People are stupid :D

** is power, ^ is eXclusive Or

Not difficult to remember :\

Since it's totally arbitrary, "remembering" can't occur when there isn't a standard...

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: My new toy..
« Reply #29 on: September 07, 2007, 08:26:33 pm »

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: My new toy..
« Reply #30 on: September 08, 2007, 02:32:12 am »
Its use in a bunch of programming languages doesn't really make it a standard, especially since there are so many other ways that it's done.

Plus, that's in the syntax of the programming language; it doesn't really apply in a situation like this... :-\

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: My new toy..
« Reply #31 on: September 09, 2007, 01:49:48 pm »
People are stupid :D

** is power, ^ is eXclusive Or

Not difficult to remember :\

Man, I wish everyone else in my math class knew C.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: My new toy..
« Reply #32 on: September 09, 2007, 06:59:28 pm »
Let's just all start using Math.pow(x, y) for exponents. That should solve everything.

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: My new toy..
« Reply #33 on: September 09, 2007, 07:03:57 pm »
Let's just all start using Math.pow(x, y) for exponents. That should solve everything.

Haha, agreed!

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: My new toy..
« Reply #34 on: September 09, 2007, 09:33:52 pm »
Man, I wish everyone else in my math class knew Java.

Fixed.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: My new toy..
« Reply #35 on: September 09, 2007, 09:39:37 pm »
Man, I wish everyone else in my math class knew Java.

Fixed.

Huh?

Incidentally, it would be even more complicated if they only knew C, because in addition to having to type pow(x, y), you'd have to find a way to link in the math library (-libm) when they, err, compile your text?

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: My new toy..
« Reply #36 on: September 10, 2007, 02:40:07 am »
I was saying that using Math.pow is Java-specific, making it even more complicated than C syntax.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: My new toy..
« Reply #37 on: September 10, 2007, 02:51:31 am »
I was saying that using Math.pow is Java-specific, making it even more complicated than C syntax.

How does it being Java syntax make it more complicated than C? :S

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: My new toy..
« Reply #38 on: September 10, 2007, 10:18:24 am »
I was saying that using Math.pow is Java-specific, making it even more complicated than C syntax.

How does it being Java syntax make it more complicated than C? :S

Math is a class. ^ and ** are operators. Math is language specific, whereas ^ and ** are part of the syntax, and can be taken to any most programming languages.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: My new toy..
« Reply #39 on: September 10, 2007, 12:06:12 pm »
Math is a class. ^ and ** are operators. Math is language specific, whereas ^ and ** are part of the syntax, and can be taken to any most programming languages.

Yes, I know, but Math being Java-specific doesn't make the syntax any more complicated.

If you start throwing ** around in C, I'm pretty sure you're not going to get the desired results. :P

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: My new toy..
« Reply #40 on: September 10, 2007, 12:47:35 pm »
Math is a class. ^ and ** are operators. Math is language specific, whereas ^ and ** are part of the syntax, and can be taken to any most programming languages.

Yes, I know, but Math being Java-specific doesn't make the syntax any more complicated.

Let my bad joke die, okay? :P
I'd personally do as Joe suggests

You might be right about that, Joe.