Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] the algorithm still works?

[DiscordArchive] the algorithm still works?

[DiscordArchive] the algorithm still works?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
05-30-2018, 08:46 AM
#1
Archived author: schlumpf • Posted: 2018-05-30T08:46:51.721000+00:00
Original source

the algorithm still works?
rektbyfaith
05-30-2018, 08:46 AM #1

Archived author: schlumpf • Posted: 2018-05-30T08:46:51.721000+00:00
Original source

the algorithm still works?

rektbyfaith
Administrator
0
05-30-2018, 08:47 AM
#2
Archived author: schlumpf • Posted: 2018-05-30T08:47:08.712000+00:00
Original source

also, this is a once per week job.
[Image: is_it_worth_the_time.png?ex=690c608c&is=...4d93e2a7c&]
rektbyfaith
05-30-2018, 08:47 AM #2

Archived author: schlumpf • Posted: 2018-05-30T08:47:08.712000+00:00
Original source

also, this is a once per week job.
[Image: is_it_worth_the_time.png?ex=690c608c&is=...4d93e2a7c&]

rektbyfaith
Administrator
0
05-30-2018, 08:47 AM
#3
Archived author: Maku • Posted: 2018-05-30T08:47:17.222000+00:00
Original source

Yeah, but maybe there's some arcane C# fuckery that does that
rektbyfaith
05-30-2018, 08:47 AM #3

Archived author: Maku • Posted: 2018-05-30T08:47:17.222000+00:00
Original source

Yeah, but maybe there's some arcane C# fuckery that does that

rektbyfaith
Administrator
0
05-30-2018, 08:47 AM
#4
Archived author: Maku • Posted: 2018-05-30T08:47:24.468000+00:00
Original source

So we don't have to do it at all
rektbyfaith
05-30-2018, 08:47 AM #4

Archived author: Maku • Posted: 2018-05-30T08:47:24.468000+00:00
Original source

So we don't have to do it at all

rektbyfaith
Administrator
0
05-30-2018, 08:52 AM
#5
Archived author: Warpten • Posted: 2018-05-30T08:52:16.242000+00:00
Original source

<@128154136020647936> Access the underlying buffer (there may not always be one, it's not a strong guarantee, but there usually is), get a fixed pointer to it and do your lookup in an unsafe block
rektbyfaith
05-30-2018, 08:52 AM #5

Archived author: Warpten • Posted: 2018-05-30T08:52:16.242000+00:00
Original source

<@128154136020647936> Access the underlying buffer (there may not always be one, it's not a strong guarantee, but there usually is), get a fixed pointer to it and do your lookup in an unsafe block

rektbyfaith
Administrator
0
05-30-2018, 08:58 AM
#6
Archived author: Maku • Posted: 2018-05-30T08:58:41.830000+00:00
Original source

Okay, no wizardry available, thanks!
rektbyfaith
05-30-2018, 08:58 AM #6

Archived author: Maku • Posted: 2018-05-30T08:58:41.830000+00:00
Original source

Okay, no wizardry available, thanks!

rektbyfaith
Administrator
0
05-30-2018, 08:59 AM
#7
Archived author: Warpten • Posted: 2018-05-30T08:59:29.538000+00:00
Original source

Would do it that way personally because I already have plain c code that does it so with minor adjustments I can just copy/paste. Nice types are nice but sometimes raw pointers are just better.

```cs
fixed (byte* b = stream.GetBuffer())
return *(int*)do_weird_lookup(b);
```
For example
rektbyfaith
05-30-2018, 08:59 AM #7

Archived author: Warpten • Posted: 2018-05-30T08:59:29.538000+00:00
Original source

Would do it that way personally because I already have plain c code that does it so with minor adjustments I can just copy/paste. Nice types are nice but sometimes raw pointers are just better.

```cs
fixed (byte* b = stream.GetBuffer())
return *(int*)do_weird_lookup(b);
```
For example

rektbyfaith
Administrator
0
05-30-2018, 09:00 AM
#8
Archived author: Warpten • Posted: 2018-05-30T09:00:23.343000+00:00
Original source

I mean you go with a dumb for loop or wrap around and use a binary reader around your stream but you'd kill performance since binaryreader has a small buffer and when you read byte[] it copies
rektbyfaith
05-30-2018, 09:00 AM #8

Archived author: Warpten • Posted: 2018-05-30T09:00:23.343000+00:00
Original source

I mean you go with a dumb for loop or wrap around and use a binary reader around your stream but you'd kill performance since binaryreader has a small buffer and when you read byte[] it copies

rektbyfaith
Administrator
0
05-30-2018, 09:01 AM
#9
Archived author: Warpten • Posted: 2018-05-30T09:01:02.693000+00:00
Original source

(am on the phone, excuse formatting)
rektbyfaith
05-30-2018, 09:01 AM #9

Archived author: Warpten • Posted: 2018-05-30T09:01:02.693000+00:00
Original source

(am on the phone, excuse formatting)

rektbyfaith
Administrator
0
05-30-2018, 09:01 AM
#10
Archived author: Maku • Posted: 2018-05-30T09:01:11.502000+00:00
Original source

no worries
rektbyfaith
05-30-2018, 09:01 AM #10

Archived author: Maku • Posted: 2018-05-30T09:01:11.502000+00:00
Original source

no worries

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)