|
Daniel Pfeffer wrote: If you want a real McGyver solution:
Take a piece of radioactive material with short half-life, place it on top of the memory, and use the processor to count the number of random bit flips induced per period of time. Knowing the half life, the rate of change in the number of bit flips will give you the length of the period of time, which (with the known number of cycles taken by the code) will give you the frequency. You forgot to say the radioactive material has to be glued to the circuit using chewing gum.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
What is it that's dictating the frequency? There must be something pumping the CPU right?
Find that device. on a PC it's something like a PIC controller or something like that (i forget) but it has a timing crystal or whatever in it. Accessing that would be a trick on a PC but it depends on your setup.
If it's not using a timing crystal how is it regulating itself?
Real programmers use butterflies
|
|
|
|
|
A simple crystal oscillator on the breadboard at the moment, but I intend to replace it with a PIC for several reasons, including controlling the processor's clock. Besides that, the PIC will also help with getting rid of any slow ROM in the processor's memory map and synchronizing up to eight processors on the same bus without any (dead)locks or bus collisions. Letting the processor(s) talk to the PIC usually is not done, simply because that feature would occupy 11 of the PICs I/O pins, of which you never seem to have enough.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
I see. I got nothing but good luck
Edit: I think most of the time, people would just drive everything off the PIC's timing rather than try to detect it, but obviously you can't do that or you would have.
Real programmers use butterflies
|
|
|
|
|
That's actually not so wrong. The old Elf was bound to a specific clock frequency, otherwise all the macguyvered components and software would fail, including the graphics chip. Why not build in a 'old Elf' compatibility mode that enables all these things only when the clock frequency is right?
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
I can't claim credit for thinking of it. It's how so many simple embedded CPU based systems work. It's how the Amiga worked. It's how the Nintendo worked.
And I figure if it worked for them, why not? But then i don't know all your requirements.
Real programmers use butterflies
|
|
|
|
|
Ah, the Atari Amiga! Never had one, but I always liked it. The 68000 was a good processor and the Amiga's chipset was better than that of the Commodore ST.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
was a commodore amiga i thought?
i'm getting old
Real programmers use butterflies
|
|
|
|
|
I did that deliberately. That was the last nerd war I did not participate in.
The 8 bit Ataris were really ahead of their time because of their custom chipset. The designers of that chipset later went on to open up their own company and wanted to design a new chipset for a game console. The name of that console and the company was Amiga. Later they they were bought by Commodore and guess what they did with the chipset and the console. The Amiga was the direct successor of the 8 bit Ataris.
Before that, Commodore had more or less thrown out the CEO. He had to go and took along some of the guys who had developed the Commodore 64. He bought Atari and had his guys design a new 16 bit computer. The Atari ST really is the direct sucessor to the Commodore 64.
Not knowing that, the Atari nerds went to war with a Commodore, and the Commodore nerds fought with their Atari. It can't get any more absurd.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
Ha! I didn't know any of that. I was a 6502 nerd too, but apple.
They had some dust ups WRT to CEOs as well.
And John Sculley can (i can't complete this sentence because of the forum rules)
He ripped my fam off to the tune of $2k in 1986 money by not supporting the brand new (at the time) Apple ][gs making it basically a brick right out of the box.
6 months after it was released you couldn't get any new software for it.
Real programmers use butterflies
|
|
|
|
|
I sped up my GLR via LALR(1) table generation code significantly. I think it's faster than Gold Parser now, despite being much more powerful.
LALR(1) is difficult to understand, but i've debugged and now optimized enough that I think I can say I understand it, almost.
I can explain how to make the tables, and I have, but I still can't explain the why of it. That's why I say almost.
Still, optimizing it taught me some things.
Real programmers use butterflies
|
|
|
|
|
I don't remember who told it, but...
Quote: 1st rule of optimization: Don't do it.
2nd rule of optimization (only for experts): Don't do it... yet.
I forgot the "only for experts" in the 2nd rule
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
modified 23-Feb-20 4:40am.
|
|
|
|
|
3rd rule of optimisation: Backup first.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Whoever believes that never dealt with an unoptimized LALR(1) algo.
It was so slow i wanted to get out and push.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: Whoever believes that... http://wiki.c2.com/?MichaelJackson[^] and not the "black or white", "thriller" and so Michael Jackson
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I mean, good for him for being a successful author but that doesn't make his statement correct.
As a counter-example I just sped up Glory by at least 100% in all cases through some well placed optimizations.
And since it's a build tool speed matters because it impacts your dev cycle such that modify->compile->run gets nasty long during the compilation part.
It makes editing grammars arduous. Speed is important for the user experience, even when the user is another developer.
On the other hand, "Don't optimize, yet" i can totally get behind. Or as I like to say "first make it work, then make it fast"
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: that doesn't make his statement correct. I know... if you see again in my first message, there were smilies because I was just joking / pissing
honey the codewitch wrote: As a counter-example I just sped up Glory by at least 100% in all cases through some well placed optimizations. I re-invented the wheel in an old project reducing cycle time from 84 msec to 17 msec while handling with 35% to 40% more data as the previous version.
honey the codewitch wrote: Or as I like to say "first make it work, then make it fast" But don't forgetting than many times "Best is the enemy of very good"
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I agree with you here, and sorry if I took you too seriously. There is one case in the past year where I bit twiddled to get the absolute best performance I could, and in that case I'd be able to justify it in code review.
Performance matters when it matters, even if it often doesn't matter for things like bizdev and webdev as much.
I don't want to saddle developers with huge build times like I said, so it's worth my effort to optimize it you know? But after a point it's diminishing returns. I spend under an hour doing it so it was well worth it, even if I was doing it for work, I could justify that. It pays for itself by a dozen builds easy.
Real programmers use butterflies
|
|
|
|
|
Quote: You never really know an algorithm like you do after you optimize it implementing it in silicon
FTFY
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
That's fair.
Real programmers use butterflies
|
|
|
|
|
I'm in the process of upgrading my Linux OS, so I've got a bunch of old files that I'd like to compress, before I move everything over to the new drives I have purchased for the upgrade. It seemed like trying to do it the "obvious" way e.g.
find /* find options */ | xargs gzip missed out on the fact that I have an 8 core processor, and should be able to leverage that, to speed things up. I was thinking about ways I might go about writing something that I could feed in a list of files, and keep all 8 cores busy compressing away, thereby reducing the time it takes to compress all the stuff I've collected over the years. After spending some time mulling it over, I figured I'd google to see if anyone else had tackled a similar problem, and come up with a solution.
Enter GNU Parallel. This wonderful piece of software does exactly what I want, plus tons more - for example it can make use of the computing resources of the other systems on your network that you have access to. For anyone interested in adding parallel execution to your shell scripts, or making use of those other systems on your network that are otherwise idle (or at least not being used by you), this seems like a great tool to help "git 'er done". For starters the author has a great set of videos on youtube: GNU Parallel videos - YouTube
Just thought I'd give it a mention as I think its quite cool.
|
|
|
|
|
Interesting, most popular zippers have a command line option for multi threading, but it is hard to find information about it. I found this list (probably for Windows):
-m (Set compression Method) switch[^]
Note that 7-Zip supports multithread mode only for LZMA / LZMA2 compression and BZip2 compression.
|
|
|
|
|
It's only just dawned on me that that phrase makes no sense at all.
I can't blame my not noticing before on my getting older, because it was in use when I was a lot younger -- but spotting it now could be a sign that I'm getting smarter.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Smarter? Yes, that is possible, but I have yet to find someone who got wiser with age.
|
|
|
|
|
Cp-Coder wrote: I have yet to find someone who got wiser with age Nonsense![^]
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|