Re: [ADVANCED-DOTNET] Does CLR support SSE or SSE2?

2003-01-09 Thread Ben Kloosterman
 -Original Message-
 From: Moderated discussion of advanced .NET topics.
 [mailto:[EMAIL PROTECTED]]On Behalf Of Richard Birkby
 Sent: Thursday, 9 January 2003 2:30 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [ADVANCED-DOTNET] Does CLR support SSE or SSE2?


 John St. Clair wrote:
 
  In your second example, you mention a 37%
  speed-up. This may not be worth it if in practice the typical user only
  spends a few seconds utilizing the zip functionality.

 However, Array.Copy is used all over the place. Just think about how XML
 parsing is done and how much of .Net reads XML files.


Array.Copy seems to make a call to an unmanaged already but is not much
faster than a loop. An assembly routine can be 150-200% quicker for the copy
, this is why I used a faster assembly copy routine - unfortunately it does
not help as much as I though because of 3 reasons
 - The system is very efficient at copying already and these do not take
long in the total scheme of things ( even though there are a lot) - and
Compression uses a LOT of array comparison and copies.
 - The optimized assembly routines are worse if the array is very small
which occur very often eg 2-10 characters. ( An inline unsafe pointer copy
works best here - which I do use if n  16)
  -  The instructions only help in moveing Double or Quad words around and
are ultimately more limited by the hardware capacity of the machine. If you
move 7 bytes you have a routine that does 4 bytes efficiently and then does
3 * a byte normally + call overhead - An inline  7 byte copy is quicker.

In some circumstance it can be worth it , but only after you finish the
project and decide you need more.

Ben


 Richard

 You can read messages from the Advanced DOTNET archive,
 unsubscribe from Advanced DOTNET, or
 subscribe to other DevelopMentor lists at http://discuss.develop.com.



You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.



Re: [ADVANCED-DOTNET] VS.NET sets breakpoint in wrong source file

2003-01-09 Thread Andrey Kuzmin
DA I am using VS.NET 2002 with SP1.  I know there was some kind of problem
DA with the first VS release but SP1 fixed that.  This particular problem
DA really is maddening.  Makes debugging a little difficult when you can't set
DA a breakpoint where you want it.

SP1? Could you tell me where I could download it? I could not find any link.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.



Re: [ADVANCED-DOTNET] unsafe code in aspx files

2003-01-09 Thread Jon Flanders
You can add a CompilerOptions attribute to the Page directive like this:

%@ Page CompilerOptions=/unsafe Language=C# %



-Original Message-
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED]]On Behalf Of Dominick Baier
Sent: Thursday, January 09, 2003 3:39 AM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] unsafe code in aspx files


Hi,

i try to put some unsafe code directly in an .aspx file (no code behind)

on execution i get the the error that i should compile with the /unsafe
switch. but i don't have a (il) compilation.

msdn talks about a attribute AllowUnsafeBlocks witch sets the /unsafe switch
programmatically. but the link to this information is broken.

can someone help me???

thanks in advance
dominick

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.



Re: [ADVANCED-DOTNET] Does CLR support SSE or SSE2?

2003-01-09 Thread Christian Weyer
Somehow related to this, here is an interesting article:
http://cedar.intel.com/cgi-bin/ids.dll/content/content.jsp?cntKey=Generic+Editorial::dotnet_boost_perform_frameworkcntType=IDS_EDITORIALcatCode=BZK

Christian Weyer
[MVP ASP.NET  XML Web Services | AspElite Member]
** http://www.xmlwebservices.cc/
*  .NET XML Web Services Repertory

John Liou wrote:

I'm thinking of the CLR performance, so do you know if CLR support SSE or
SSE2? Thanks!

-John

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.



You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.



[ADVANCED-DOTNET] Controlling (fine grained) db locks using standard .NET interfaces - possible?

2003-01-09 Thread Thomas Tomiczek
Hello,

I have a small problem to solve to the best possible solution, and I am
starting to feel that there might not be one. Maybe some of you can
comment.

Basically, I write a generic db abstraction layer (the generic is
important here). I need to keep fine grained control over mydb locks -
means: I need to control what locks get placed upon reading, BUT - I
want (or: it has been requested) we expose the ability to change this
lock. Well, even more specific: Our layer ( a complete O/R mapper) works
with optimistic concurrency normally, but people want to have explicit
selected locks on top of this.

Now, I have no problem selecing a distinct concurrency level for a
database transaction. In normal operations we open a db transaction
(with whatever lock level we choose), execute the query (aggregating the
data into an offline cache), and rollback. Once the user is finished, we
basically open a new transaction and write all changes out, then commit.

This works perfectly (when not using COM+ - under COM+ there is an issue
getting rid of the attached DB connection). Ust that someone wants to be
able to explicitly lock a certain record from our API layer.

I went through the .NET database interface (which for this case booils
down to the IdbTransaction interface), and I basically see that the
concurrency level can not be changed. This means, as it looks like, that
I am not able to somehow inject a transaction with a separate
isolation level into an existing one. I also did not find any mechanism
to merge two transactions (open a second transaction in the first one
- important for later reads).

Anyone else having had a fight with this? I am pretty short to say
goodbye to this locking feature - which is a shame, becuase sometimes it
really might be useful.



Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.



Re: [ADVANCED-DOTNET] Salt in PasswordDeriveBytes

2003-01-09 Thread Andrew Hopper
Gosh, that's being a bit harsh. He already admitted that it's not as secure
as a random salt. While it's true that using a derived salt is not as secure
as a random salt, it is definitely more secure than using no salt at all.
With this approach, it is required that A) the black hat know your salt
algorithm (which, unfortunately, is not terribly complicated in this case
but is still better than nothing) and B) the black hat generate a hashed
dictionary using the now-known salt and a non-hashed dictionary. Again, this
approach is nowhere near as secure as when using a random salt, but he is
correct in stating that it will slow down, if not keep out, script kiddies.

-Andy Hopper

- Original Message -
From: Thomas Tomiczek [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 09, 2003 3:08 AM
Subject: Re: [ADVANCED-DOTNET] Salt in PasswordDeriveBytes


Congratulations. You have propably managed to completly destroy the
advantage of salt in your usage. Using a derived salt value means, at
least to my understanding of the maths involved, that you have just
KILLED the effect.

Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)



 -Original Message-
 From: Craft, Steve [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 7:08 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [ADVANCED-DOTNET] Salt in PasswordDeriveBytes


 In the case of storing username/password in a database table,
 I just use a salt of the username backwards and append that
 to the password before it gets encrypted and written to the
 password column.

 In normal app usage, the username is looked up and then the
 backwards username is appended to the password and that hash
 is compared to the password column.

 That's not the most earth-shattering way of doing things, but
 it should slow down any script-kiddie that gets the password
 file; he will have to append the username to every password
 try on every different table row.  It also makes the salt
 different for each user, but is easier to maintain than a
 random number (or even a well-known hard-coded number) for each one.


 You can read messages from the Advanced DOTNET archive,
 unsubscribe from Advanced DOTNET, or subscribe to other
 DevelopMentor lists at http://discuss.develop.com.


You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.



[ADVANCED-DOTNET] unsafe code in aspx files

2003-01-09 Thread Dominick Baier
Hi, 

i try to put some unsafe code directly in an .aspx file (no code behind)

on execution i get the the error that i should compile with the /unsafe
switch. but i don't have a (il) compilation.

msdn talks about a attribute AllowUnsafeBlocks witch sets the /unsafe switch
programmatically. but the link to this information is broken.

can someone help me???

thanks in advance
dominick

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.