Welcome, Guest. Please login or register.

Author Topic: WinUAE exposing how crappy Windows is  (Read 48735 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16878
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WinUAE exposing how crappy Windows is
« on: July 11, 2010, 01:11:42 PM »
Quote from: AmigaHeretic;569851
So search times are Θ(log n) in the average case and Ω(n) in the worst case?

n is the number of registry entries.  So the more n the slower it is.

All search algorithms get slower as the number of items to search increases. O(log n) is typical for tree search. A hundred fold increase in N does not equate to a hundred fold increase in time taken.

Searching through a flat file database almost certainly faster than trawling through a directory tree to find an environment variable...
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16878
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WinUAE exposing how crappy Windows is
« Reply #1 on: July 11, 2010, 09:12:49 PM »
Quote from: AmigaHeretic;569910
If we are talking ENV: vs registry, there are maybe 50 files in my registry?  vs millions of entries in my reg?

Sure, there are millions... Thousands, perhaps. Millions? Mope. Unless you've installed and removed new software every other day for the last 10 years and never once cleaned out the registry :)

Looking up a file on disk is not quicker than traversing a tree structure in memory. Absolutely no way.

You can write code to prove this to yourself, if you wish.

Put N named variables into N files in a directory and write a function that, given the name as a string, opens the file and retrieves the value. Time how long it takes to retrieve any named value.

Now, write code that puts the same N values into a trie structure and serializes it into a file. This is your "registry" file.

Now write a function that loads said file and rebuilds said trie file on first access and looks up your names variable and time how long it takes to retrieve any named value.

The only time it will ever be slower than the first method is the first time, when the trie data must be rebuilt in memory.

Every subsequent access will be orders of magnitude faster than asking the filesystem to open a file and retrieve the contents.

I know this, because I've had to write code that relies on such data structures.

I'm not defending MS here but people assume that because MS implement the registry in a somewhat stupid way (that being it never compacts after keys are removed) that the concept of a registry is a stupid idea altogether. It isn't.
« Last Edit: July 11, 2010, 09:16:57 PM by Karlos »
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16878
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WinUAE exposing how crappy Windows is
« Reply #2 on: July 12, 2010, 07:16:24 PM »
Quote from: AmigaHeretic;569951
I seems like you are telling me the more items you have to search the same speed it goes.

If you really have that solution please post it here.

It's a question of how much longer it takes. Searching a properly configured tree is at worst O(log N) and can do better. However, that only describes the general shape of the curve. The fact is that tree searches are fast. A search is more dependent on the length of the key than it is the number of entries in the tree.

As part of my previous job, I wrote a billing system for a voice system. In order to work out what basic pricing plan was required for a given call, you had to look up the number. Not all of it, but find the longest matching prefix and use whatever pricing code it pointed to.

We had a database with literally hundreds of thousands of number prefixes in it that each mapped to info/price data. Prefixes could be as long as an entire phone number, but typically varied from just 2 digits up to 10 or so.

The code loaded these into a trie, where you had a node structure in which there were up to 10 child nodes (one per digit) and a pointer to a data record (if any) for the current node.

Take a number, and pointing at the root of the trie, for each successive digit, attempt to get the next child node, until you get to a leaf node. Along the way, collect any data record entries so that you can build a breakdown of the number (eg UK National / Manchester / Rusholme).

Despite having around a million nodes in the trie, searching it was lighting fast. You exhaust the search as soon as you hit a leaf node, so your number might be 14 digits, but your longest match might be found after just 6.

This code (written in straight C++) was capable of performing over 15 million such lookups a second on the machine. The actual application, which needed to process data from several database tables and output them to another was entirely IO bound in the end.

In short, searching a tree structure is not slow.
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16878
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WinUAE exposing how crappy Windows is
« Reply #3 on: July 14, 2010, 06:55:15 PM »
Quote from: Arkhan;570315
holy christ.  The fliddery is in full force in this thread.



Most linux users immediately want to watch movies and listen to MP3s?

INTERESTING!

I thought most linux users immediately wanted to do something useful.

Also, piss on Ubuntu.  Redhat/Fedora smokes that brown pile of MacOSXknockoff.  :D



Would this be the same fedonka that utterly failed to even boot past decompressing the kernel on my PC, upon which Ubuntu and debian work just fine?

;)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16878
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WinUAE exposing how crappy Windows is
« Reply #4 on: July 14, 2010, 08:53:22 PM »
Quote from: outlawal2;570358
Yep and that is just about the only thing you have said worth repeating...  
And this STUPID WINDOWS BASHING thread goes on...

Get a life buddy...  You are boring me..  
And wasting my valuable time that I like to use reading things that are USEFUL

And since you will doubtless be gone by now, I'd just like to add this insightful comment on the subject...
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16878
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WinUAE exposing how crappy Windows is
« Reply #5 on: July 14, 2010, 10:11:41 PM »
Quote from: AmigaHeretic;570379
Yeah, I mean why should "I" be in control of my computer?  How "retarded" of me.


You are in control, so long as you have access to the root account or sudo. Running almost everything in a limited user context limits the damage you, or a bad application or any combination of the two, can do.

You only need root access when making changes that are potentially dangerous or have other far reaching consequences for your system.

With root comes the power to totally ruin your system with a few keystrokes.

After all, as with any user, you'd be the first to blame the system when you wipe it out by accidentally ... the whole thing.

Wanting to have ultimate authority at all times without thinking about the consequences can indeed be a retarded thing. Would you walk around with a loaded gun in your pants with the safety permanently off?

Running as root at all times is about as sensible within the context of computer use.
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16878
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WinUAE exposing how crappy Windows is
« Reply #6 on: July 14, 2010, 11:23:40 PM »
Quote from: halvliter'n;570398
So, if you use updated firewall and ativirus programs it's not enough? I almost always use the admin account, I can not be bothered to switch back and forth all the time.

And by the way, the Windows file structure and user friendliness is grape in comparison with the Amiga.


Switch back and forth to do what? Seriously, what everyday tasks do people do that requires it?
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16878
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WinUAE exposing how crappy Windows is
« Reply #7 on: July 14, 2010, 11:55:10 PM »
Quote from: halvliter'n;570406
I do not really remember. But every time I try to update, install or uninstall drivers and programs, I get told that i must have administrative rights, and it's virtually every day.
But others who use my computer get not use the admin account of course, if I am not inattentive then.


You do it "virtually every day" and yet you don't remember what it is? :roflmao:
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16878
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WinUAE exposing how crappy Windows is
« Reply #8 on: July 15, 2010, 12:34:18 AM »
Quote from: AmigaHeretic;570428
I love on Amiga that apps are seperate from the OS.

I'm sure you got that backwards. AmigaOS (and it's offshoots) are the only OSes I have where an application passes chunks of it's own data directly to the OS and vice versa and with each other.

Technically speaking, there's no separation between OS and applications at any meaningful level whatsoever.

You can install them anywhere you like too. You could put an app in your L: assign if you wanted...
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16878
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: WinUAE exposing how crappy Windows is
« Reply #9 on: July 15, 2010, 01:32:44 AM »
Quote from: halvliter'n;570444
Well, if it happens then I allow my antivirus and malware programs to fix it.


You are making a blatant mistake in assuming they are even aware of the intrusion. New threats invariably appear before updates to combat said threats.

As the_leander says, if you are running as admin, you are taking an unnecessary risk. If you are admin, then almost every process you create is running as admin. That includes any malware you pick up.

The amiga is a single user platform, but the majority of other systems employ a multiuser model for a damned good reason.
int p; // A